diff --git a/examples/configurable_plugin/configurable_plugin.cpp b/examples/configurable_plugin/configurable_plugin.cpp index fee0961..54d83e1 100644 --- a/examples/configurable_plugin/configurable_plugin.cpp +++ b/examples/configurable_plugin/configurable_plugin.cpp @@ -1,6 +1,7 @@ #include "configurable_plugin.h" #include + #include BOOST_DLL_ALIAS(ConfigurablePluginA::create, create_a); diff --git a/examples/configurable_plugin/configurable_plugin_manager.cpp b/examples/configurable_plugin/configurable_plugin_manager.cpp index a73c4b1..14856cd 100644 --- a/examples/configurable_plugin/configurable_plugin_manager.cpp +++ b/examples/configurable_plugin/configurable_plugin_manager.cpp @@ -1,6 +1,3 @@ -#include "configurable_plugin.h" -#include "cpp/plugin.h" -#include "plugin_manager.h" #include #include #include @@ -10,6 +7,10 @@ #include #include +#include "configurable_plugin.h" +#include "ppplugin/cpp/plugin.h" +#include "ppplugin/plugin_manager.h" + int main(int argc, char* argv[]) { try { diff --git a/examples/lua_plugin/lua_plugin_manager.cpp b/examples/lua_plugin/lua_plugin_manager.cpp index 88a95b0..2e431fa 100644 --- a/examples/lua_plugin/lua_plugin_manager.cpp +++ b/examples/lua_plugin/lua_plugin_manager.cpp @@ -1,6 +1,3 @@ -#include "lua/plugin.h" -#include "plugin_manager.h" - #include #include #include @@ -9,6 +6,9 @@ #include #include +#include "ppplugin/lua/plugin.h" +#include "ppplugin/plugin_manager.h" + int main(int argc, char* argv[]) { try { diff --git a/examples/multi_language_plugin/multi_language_plugin_manager.cpp b/examples/multi_language_plugin/multi_language_plugin_manager.cpp index d38a7a9..dd98d88 100644 --- a/examples/multi_language_plugin/multi_language_plugin_manager.cpp +++ b/examples/multi_language_plugin/multi_language_plugin_manager.cpp @@ -1,8 +1,3 @@ -#include "errors.h" -#include "noop_plugin.h" -#include "plugin.h" -#include "plugin_manager.h" - #include #include #include @@ -12,6 +7,11 @@ #include #include +#include "ppplugin/errors.h" +#include "ppplugin/noop_plugin.h" +#include "ppplugin/plugin.h" +#include "ppplugin/plugin_manager.h" + int main(int argc, char* argv[]) { if (argc < 1) { diff --git a/examples/multi_language_plugin/plugins/cpp_plugin.cpp b/examples/multi_language_plugin/plugins/cpp_plugin.cpp index 42a2087..d84aa12 100644 --- a/examples/multi_language_plugin/plugins/cpp_plugin.cpp +++ b/examples/multi_language_plugin/plugins/cpp_plugin.cpp @@ -1,6 +1,7 @@ -#include #include +#include + void initialize() { std::cout << "C++ initialize" << '\n'; diff --git a/examples/multi_return_lua_plugin/multi_return_lua_plugin_manager.cpp b/examples/multi_return_lua_plugin/multi_return_lua_plugin_manager.cpp index 2c4bb78..8e549fa 100644 --- a/examples/multi_return_lua_plugin/multi_return_lua_plugin_manager.cpp +++ b/examples/multi_return_lua_plugin/multi_return_lua_plugin_manager.cpp @@ -1,10 +1,10 @@ -#include "plugin_manager.h" - #include #include #include #include +#include "ppplugin/plugin_manager.h" + int main(int argc, char* argv[]) { try { diff --git a/examples/python_plugin/python_plugin_manager.cpp b/examples/python_plugin/python_plugin_manager.cpp index 6d79f72..fcdeca0 100644 --- a/examples/python_plugin/python_plugin_manager.cpp +++ b/examples/python_plugin/python_plugin_manager.cpp @@ -1,6 +1,3 @@ -#include "plugin_manager.h" -#include "python/plugin.h" - #include #include #include @@ -10,6 +7,9 @@ #include #include +#include "ppplugin/plugin_manager.h" +#include "ppplugin/python/plugin.h" + int main(int argc, char* argv[]) { try { diff --git a/examples/simple_plugin/simple_plugin_manager.cpp b/examples/simple_plugin/simple_plugin_manager.cpp index afd4e52..1d5d170 100644 --- a/examples/simple_plugin/simple_plugin_manager.cpp +++ b/examples/simple_plugin/simple_plugin_manager.cpp @@ -7,9 +7,10 @@ #include #include -#include "cpp/plugin.h" -#include "errors.h" -#include "plugin_manager.h" +#include "ppplugin/cpp/plugin.h" +#include "ppplugin/errors.h" +#include "ppplugin/plugin_manager.h" + #include "simple_plugin.h" void printError(std::string_view function_name, const ppplugin::CallError& error) diff --git a/include/c/plugin.h b/include/ppplugin/c/plugin.h similarity index 94% rename from include/c/plugin.h rename to include/ppplugin/c/plugin.h index dbf83bb..faf1c07 100644 --- a/include/c/plugin.h +++ b/include/ppplugin/c/plugin.h @@ -1,8 +1,8 @@ #ifndef PPPLUGIN_C_PLUGIN_H #define PPPLUGIN_C_PLUGIN_H -#include "detail/boost_dll_loader.h" -#include "errors.h" +#include "ppplugin/detail/boost_dll_loader.h" +#include "ppplugin/errors.h" namespace ppplugin { class CPlugin { diff --git a/include/cpp/object_plugin.h b/include/ppplugin/cpp/object_plugin.h similarity index 100% rename from include/cpp/object_plugin.h rename to include/ppplugin/cpp/object_plugin.h diff --git a/include/cpp/plugin.h b/include/ppplugin/cpp/plugin.h similarity index 94% rename from include/cpp/plugin.h rename to include/ppplugin/cpp/plugin.h index 3056b3a..e06eddd 100644 --- a/include/cpp/plugin.h +++ b/include/ppplugin/cpp/plugin.h @@ -1,8 +1,8 @@ #ifndef PPPLUGIN_CPP_PLUGIN_H #define PPPLUGIN_CPP_PLUGIN_H -#include "detail/boost_dll_loader.h" -#include "errors.h" +#include "ppplugin/detail/boost_dll_loader.h" +#include "ppplugin/errors.h" #include diff --git a/include/detail/boost_dll_loader.h b/include/ppplugin/detail/boost_dll_loader.h similarity index 98% rename from include/detail/boost_dll_loader.h rename to include/ppplugin/detail/boost_dll_loader.h index ec5c0b6..7bb7b42 100644 --- a/include/detail/boost_dll_loader.h +++ b/include/ppplugin/detail/boost_dll_loader.h @@ -1,7 +1,7 @@ #ifndef PPPLUGIN_DETAIL_BOOST_DLL_LOADER_H #define PPPLUGIN_DETAIL_BOOST_DLL_LOADER_H -#include "errors.h" +#include "ppplugin/errors.h" #include diff --git a/include/detail/compatibility_utils.h b/include/ppplugin/detail/compatibility_utils.h similarity index 100% rename from include/detail/compatibility_utils.h rename to include/ppplugin/detail/compatibility_utils.h diff --git a/include/detail/compiler_info.h b/include/ppplugin/detail/compiler_info.h similarity index 100% rename from include/detail/compiler_info.h rename to include/ppplugin/detail/compiler_info.h diff --git a/include/detail/function_details.h b/include/ppplugin/detail/function_details.h similarity index 95% rename from include/detail/function_details.h rename to include/ppplugin/detail/function_details.h index 2aa9336..34d021a 100644 --- a/include/detail/function_details.h +++ b/include/ppplugin/detail/function_details.h @@ -1,7 +1,7 @@ #ifndef PPPLUGIN_DETAIL_FUNCTION_DETAILS_H #define PPPLUGIN_DETAIL_FUNCTION_DETAILS_H -#include "detail/template_helpers.h" +#include "ppplugin/detail/template_helpers.h" #include diff --git a/include/detail/scope_guard.h b/include/ppplugin/detail/scope_guard.h similarity index 100% rename from include/detail/scope_guard.h rename to include/ppplugin/detail/scope_guard.h diff --git a/include/detail/template_helpers.h b/include/ppplugin/detail/template_helpers.h similarity index 100% rename from include/detail/template_helpers.h rename to include/ppplugin/detail/template_helpers.h diff --git a/include/errors.h b/include/ppplugin/errors.h similarity index 96% rename from include/errors.h rename to include/ppplugin/errors.h index 01d69da..0aa6749 100644 --- a/include/errors.h +++ b/include/ppplugin/errors.h @@ -1,8 +1,8 @@ #ifndef PPPLUGIN_ERRORS_H #define PPPLUGIN_ERRORS_H -#include "detail/compatibility_utils.h" -#include "expected.h" +#include "ppplugin/detail/compatibility_utils.h" +#include "ppplugin/expected.h" #include #ifndef PPPLUGIN_CPP17_COMPATIBILITY diff --git a/include/expected.h b/include/ppplugin/expected.h similarity index 100% rename from include/expected.h rename to include/ppplugin/expected.h diff --git a/include/lua/lua_helpers.h b/include/ppplugin/lua/lua_helpers.h similarity index 100% rename from include/lua/lua_helpers.h rename to include/ppplugin/lua/lua_helpers.h diff --git a/include/lua/lua_script.h b/include/ppplugin/lua/lua_script.h similarity index 97% rename from include/lua/lua_script.h rename to include/ppplugin/lua/lua_script.h index 270634d..5a456b1 100644 --- a/include/lua/lua_script.h +++ b/include/ppplugin/lua/lua_script.h @@ -1,9 +1,9 @@ #ifndef PPPLUGIN_LUA_SCRIPT_H #define PPPLUGIN_LUA_SCRIPT_H -#include "errors.h" -#include "expected.h" #include "lua_state.h" +#include "ppplugin/errors.h" +#include "ppplugin/expected.h" #include #include diff --git a/include/lua/lua_state.h b/include/ppplugin/lua/lua_state.h similarity index 98% rename from include/lua/lua_state.h rename to include/ppplugin/lua/lua_state.h index 0ffee8c..599e074 100644 --- a/include/lua/lua_state.h +++ b/include/ppplugin/lua/lua_state.h @@ -1,10 +1,10 @@ #ifndef PPPLUGIN_LUA_STATE_H #define PPPLUGIN_LUA_STATE_H -#include "detail/compatibility_utils.h" -#include "detail/function_details.h" -#include "errors.h" #include "lua_helpers.h" +#include "ppplugin/detail/compatibility_utils.h" +#include "ppplugin/detail/function_details.h" +#include "ppplugin/errors.h" #include #include diff --git a/include/lua/plugin.h b/include/ppplugin/lua/plugin.h similarity index 96% rename from include/lua/plugin.h rename to include/ppplugin/lua/plugin.h index 2284869..23bacba 100644 --- a/include/lua/plugin.h +++ b/include/ppplugin/lua/plugin.h @@ -1,8 +1,8 @@ #ifndef PPPLUGIN_LUA_PLUGIN_H #define PPPLUGIN_LUA_PLUGIN_H -#include "errors.h" -#include "lua/lua_script.h" +#include "lua_script.h" +#include "ppplugin/errors.h" #include diff --git a/include/noop_plugin.h b/include/ppplugin/noop_plugin.h similarity index 96% rename from include/noop_plugin.h rename to include/ppplugin/noop_plugin.h index 6bb3ee6..5a41d5c 100644 --- a/include/noop_plugin.h +++ b/include/ppplugin/noop_plugin.h @@ -1,7 +1,7 @@ #ifndef PPPLUGIN_NOOP_PLUGIN_H #define PPPLUGIN_NOOP_PLUGIN_H -#include "errors.h" +#include "ppplugin/errors.h" #include diff --git a/include/plugin.h b/include/ppplugin/plugin.h similarity index 93% rename from include/plugin.h rename to include/ppplugin/plugin.h index f7698f0..05a6950 100644 --- a/include/plugin.h +++ b/include/ppplugin/plugin.h @@ -1,14 +1,14 @@ #ifndef PPPLUGIN_PLUGIN_H #define PPPLUGIN_PLUGIN_H -#include "c/plugin.h" -#include "cpp/plugin.h" -#include "errors.h" -#include "lua/plugin.h" -#include "noop_plugin.h" -#include "python/plugin.h" - -#include "detail/template_helpers.h" +#include "ppplugin/c/plugin.h" +#include "ppplugin/cpp/plugin.h" +#include "ppplugin/errors.h" +#include "ppplugin/lua/plugin.h" +#include "ppplugin/noop_plugin.h" +#include "ppplugin/python/plugin.h" + +#include "ppplugin/detail/template_helpers.h" #include diff --git a/include/plugin_manager.h b/include/ppplugin/plugin_manager.h similarity index 91% rename from include/plugin_manager.h rename to include/ppplugin/plugin_manager.h index 2e6a4c7..9fb84dc 100644 --- a/include/plugin_manager.h +++ b/include/ppplugin/plugin_manager.h @@ -1,14 +1,14 @@ #ifndef PPPLUGIN_PLUGIN_MANAGER_H #define PPPLUGIN_PLUGIN_MANAGER_H -#include "c/plugin.h" -#include "cpp/plugin.h" -#include "detail/template_helpers.h" -#include "errors.h" -#include "expected.h" -#include "lua/plugin.h" -#include "plugin.h" -#include "python/plugin.h" +#include "ppplugin/c/plugin.h" +#include "ppplugin/cpp/plugin.h" +#include "ppplugin/detail/template_helpers.h" +#include "ppplugin/errors.h" +#include "ppplugin/expected.h" +#include "ppplugin/lua/plugin.h" +#include "ppplugin/plugin.h" +#include "ppplugin/python/plugin.h" #include diff --git a/include/python/plugin.h b/include/ppplugin/python/plugin.h similarity index 88% rename from include/python/plugin.h rename to include/ppplugin/python/plugin.h index a6225c8..bf9fb16 100644 --- a/include/python/plugin.h +++ b/include/ppplugin/python/plugin.h @@ -1,10 +1,10 @@ #ifndef PPPLUGIN_PYTHON_PLUGIN_H #define PPPLUGIN_PYTHON_PLUGIN_H -#include "detail/function_details.h" -#include "errors.h" -#include "expected.h" -#include "python/python_interpreter.h" +#include "ppplugin/detail/function_details.h" +#include "ppplugin/errors.h" +#include "ppplugin/expected.h" +#include "ppplugin/python/python_interpreter.h" #include diff --git a/include/python/python_exception.h b/include/ppplugin/python/python_exception.h similarity index 100% rename from include/python/python_exception.h rename to include/ppplugin/python/python_exception.h diff --git a/include/python/python_forward_defs.h b/include/ppplugin/python/python_forward_defs.h similarity index 100% rename from include/python/python_forward_defs.h rename to include/ppplugin/python/python_forward_defs.h diff --git a/include/python/python_guard.h b/include/ppplugin/python/python_guard.h similarity index 100% rename from include/python/python_guard.h rename to include/ppplugin/python/python_guard.h diff --git a/include/python/python_interpreter.h b/include/ppplugin/python/python_interpreter.h similarity index 96% rename from include/python/python_interpreter.h rename to include/ppplugin/python/python_interpreter.h index 98d3e34..592ff9d 100644 --- a/include/python/python_interpreter.h +++ b/include/ppplugin/python/python_interpreter.h @@ -1,9 +1,9 @@ #ifndef PPPLUGIN_PYTHON_INTERPRETER_H #define PPPLUGIN_PYTHON_INTERPRETER_H -#include "errors.h" -#include "python/python_guard.h" +#include "ppplugin/errors.h" #include "python_forward_defs.h" +#include "python_guard.h" #include "python_object.h" #include "python_tuple.h" diff --git a/include/python/python_object.h b/include/ppplugin/python/python_object.h similarity index 100% rename from include/python/python_object.h rename to include/ppplugin/python/python_object.h diff --git a/include/python/python_tuple.h b/include/ppplugin/python/python_tuple.h similarity index 99% rename from include/python/python_tuple.h rename to include/ppplugin/python/python_tuple.h index 2461b1c..a31837c 100644 --- a/include/python/python_tuple.h +++ b/include/ppplugin/python/python_tuple.h @@ -5,7 +5,6 @@ #include "python_object.h" #include -#include #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9a02424..1be4a5f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,10 +17,8 @@ target_link_libraries( ${LIBRARY_TARGET} PUBLIC Boost::filesystem PUBLIC Python::Python - PRIVATE ${LUA_LIBRARIES}) -if(${PPPLUGIN_ENABLE_CPP17_COMPATIBILITY}) - target_link_libraries(${LIBRARY_TARGET} PUBLIC fmt::fmt) -endif() + PRIVATE ${LUA_LIBRARIES} + PUBLIC $<$:fmt::fmt>) target_include_directories( ${LIBRARY_TARGET} PRIVATE ${LUA_INCLUDE_DIR} diff --git a/src/boost_dll_loader.cpp b/src/boost_dll_loader.cpp index 62fc600..3921253 100644 --- a/src/boost_dll_loader.cpp +++ b/src/boost_dll_loader.cpp @@ -1,4 +1,4 @@ -#include "errors.h" +#include "ppplugin/errors.h" #include #include diff --git a/src/lua_script.cpp b/src/lua_script.cpp index 0ad710e..673d003 100644 --- a/src/lua_script.cpp +++ b/src/lua_script.cpp @@ -1,8 +1,8 @@ -#include "lua/lua_script.h" -#include "detail/compatibility_utils.h" -#include "errors.h" -#include "expected.h" -#include "lua/lua_state.h" +#include "ppplugin/lua/lua_script.h" +#include "ppplugin/detail/compatibility_utils.h" +#include "ppplugin/errors.h" +#include "ppplugin/expected.h" +#include "ppplugin/lua/lua_state.h" #include #include diff --git a/src/lua_state.cpp b/src/lua_state.cpp index 911c342..b2be374 100644 --- a/src/lua_state.cpp +++ b/src/lua_state.cpp @@ -1,4 +1,4 @@ -#include "lua/lua_state.h" +#include "ppplugin/lua/lua_state.h" #include #include diff --git a/src/python_exception.cpp b/src/python_exception.cpp index 665bf6d..aa9f02c 100644 --- a/src/python_exception.cpp +++ b/src/python_exception.cpp @@ -1,6 +1,6 @@ -#include "python/python_exception.h" -#include "detail/compatibility_utils.h" -#include "python/python_object.h" +#include "ppplugin/python/python_exception.h" +#include "ppplugin/detail/compatibility_utils.h" +#include "ppplugin/python/python_object.h" #include #include diff --git a/src/python_guard.cpp b/src/python_guard.cpp index 5094d2c..4b68bda 100644 --- a/src/python_guard.cpp +++ b/src/python_guard.cpp @@ -1,5 +1,5 @@ -#include "python/python_guard.h" -#include "python/python_forward_defs.h" +#include "ppplugin/python/python_guard.h" +#include "ppplugin/python/python_forward_defs.h" #define PY_SSIZE_T_CLEAN #include // NOLINT(misc-include-cleaner) diff --git a/src/python_interpreter.cpp b/src/python_interpreter.cpp index c4f36a4..c608f66 100644 --- a/src/python_interpreter.cpp +++ b/src/python_interpreter.cpp @@ -1,9 +1,9 @@ -#include "python/python_interpreter.h" -#include "errors.h" -#include "python/python_exception.h" -#include "python/python_forward_defs.h" -#include "python/python_guard.h" -#include "python/python_object.h" +#include "ppplugin/python/python_interpreter.h" +#include "ppplugin/errors.h" +#include "ppplugin/python/python_exception.h" +#include "ppplugin/python/python_forward_defs.h" +#include "ppplugin/python/python_guard.h" +#include "ppplugin/python/python_object.h" #include #include diff --git a/src/python_object.cpp b/src/python_object.cpp index 9b90a9d..a858fd8 100644 --- a/src/python_object.cpp +++ b/src/python_object.cpp @@ -1,4 +1,4 @@ -#include "python/python_object.h" +#include "ppplugin/python/python_object.h" #include #include diff --git a/src/python_plugin.cpp b/src/python_plugin.cpp index d64bf54..3c11c85 100644 --- a/src/python_plugin.cpp +++ b/src/python_plugin.cpp @@ -1,6 +1,6 @@ -#include "errors.h" -#include "expected.h" -#include "python/plugin.h" +#include "ppplugin/errors.h" +#include "ppplugin/expected.h" +#include "ppplugin/python/plugin.h" #include diff --git a/src/python_tuple.cpp b/src/python_tuple.cpp index af0b42c..f8114a7 100644 --- a/src/python_tuple.cpp +++ b/src/python_tuple.cpp @@ -1,5 +1,5 @@ -#include "python/python_tuple.h" -#include "python/python_forward_defs.h" +#include "ppplugin/python/python_tuple.h" +#include "ppplugin/python/python_forward_defs.h" #include #include diff --git a/test/detail_templates_tests.cpp b/test/detail_templates_tests.cpp index 2f01646..f180dc1 100644 --- a/test/detail_templates_tests.cpp +++ b/test/detail_templates_tests.cpp @@ -1,4 +1,4 @@ -#include "detail/template_helpers.h" +#include "ppplugin/detail/template_helpers.h" #include #include diff --git a/test/expected_tests.cpp b/test/expected_tests.cpp index 3bd0e4b..40401dd 100644 --- a/test/expected_tests.cpp +++ b/test/expected_tests.cpp @@ -1,4 +1,4 @@ -#include "expected.h" +#include "ppplugin/expected.h" #include "test_helper.h" #include "test_types.h" diff --git a/test/scope_guard_tests.cpp b/test/scope_guard_tests.cpp index 37cde97..7a0b1cc 100644 --- a/test/scope_guard_tests.cpp +++ b/test/scope_guard_tests.cpp @@ -1,4 +1,4 @@ -#include "detail/scope_guard.h" +#include "ppplugin/detail/scope_guard.h" #include #include