From fffd715e7db5b2fe18e98950d401c218f4f86af8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 3 Aug 2022 23:43:07 +0200 Subject: [PATCH] Solving bugs from core_plugin. --- source/cli/plugins/core_plugin/CMakeLists.txt | 27 ++++++++++++++----- .../CMakeLists.txt | 3 ++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/source/cli/plugins/core_plugin/CMakeLists.txt b/source/cli/plugins/core_plugin/CMakeLists.txt index 414acc8d22..602e9f5b7c 100644 --- a/source/cli/plugins/core_plugin/CMakeLists.txt +++ b/source/cli/plugins/core_plugin/CMakeLists.txt @@ -106,6 +106,13 @@ set_target_properties(${target} ${DEFAULT_PROJECT_OPTIONS} FOLDER "${IDE_FOLDER}" BUNDLE $<$:$<$>> + + # Define custom build output directory + LIBRARY_OUTPUT_DIRECTORY "${PROJECT_OUTPUT_DIR}/plugins/${target}" + LIBRARY_OUTPUT_DIRECTORY_DEBUG "${PROJECT_OUTPUT_DIR}/plugins/${target}" + LIBRARY_OUTPUT_DIRECTORY_RELEASE "${PROJECT_OUTPUT_DIR}/plugins/${target}" + LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${PROJECT_OUTPUT_DIR}/plugins/${target}" + LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${PROJECT_OUTPUT_DIR}/plugins/${target}" ) # @@ -188,7 +195,20 @@ target_link_libraries(${target} # Define dependencies # +# Copy metacall.json +add_custom_target(${target}-create-plugin-dir ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}/plugins/core_plugin + COMMAND ${CMAKE_COMMAND} -E copy ${source_path}/metacall.json ${PROJECT_OUTPUT_DIR}/plugins/core_plugin +) + +set_target_properties(${target}-create-plugin-dir + PROPERTIES + FOLDER "${IDE_FOLDER}" +) + add_dependencies(${target} + ${target}-create-plugin-dir plugin_extension ) @@ -196,13 +216,6 @@ add_dependencies(${target} # Deployment # -# Copy metacall-*.json -add_custom_target(${target}-create-plugin-dir ALL - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}/plugins/core_plugin - COMMAND ${CMAKE_COMMAND} -E copy ${source_path}/metacall.json ${PROJECT_OUTPUT_DIR}/plugins/core_plugin -) - # Library install(TARGETS ${target} EXPORT "${target}-export" COMPONENT dev diff --git a/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt index 7955e30f09..8c3d4e70cf 100644 --- a/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if this loader is enabled -if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_EXT OR NOT OPTION_BUILD_EXTENSIONS) +if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_EXT OR NOT OPTION_BUILD_EXTENSIONS OR NOT OPTION_BUILD_CLI) return() endif() @@ -130,6 +130,7 @@ add_test(NAME ${target} add_dependencies(${target} ext_loader plugin_extension + core_plugin # Requires core_plugin (from CLI) for reproducing it ) #