Skip to content

Commit fffd715

Browse files
committed
Solving bugs from core_plugin.
1 parent 0e2f483 commit fffd715

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

source/cli/plugins/core_plugin/CMakeLists.txt

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ set_target_properties(${target}
106106
${DEFAULT_PROJECT_OPTIONS}
107107
FOLDER "${IDE_FOLDER}"
108108
BUNDLE $<$<BOOL:${APPLE}>:$<$<VERSION_GREATER:${PROJECT_OS_VERSION},8>>>
109+
110+
# Define custom build output directory
111+
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_OUTPUT_DIR}/plugins/${target}"
112+
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${PROJECT_OUTPUT_DIR}/plugins/${target}"
113+
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${PROJECT_OUTPUT_DIR}/plugins/${target}"
114+
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${PROJECT_OUTPUT_DIR}/plugins/${target}"
115+
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${PROJECT_OUTPUT_DIR}/plugins/${target}"
109116
)
110117

111118
#
@@ -188,21 +195,27 @@ target_link_libraries(${target}
188195
# Define dependencies
189196
#
190197

198+
# Copy metacall.json
199+
add_custom_target(${target}-create-plugin-dir ALL
200+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
201+
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}/plugins/core_plugin
202+
COMMAND ${CMAKE_COMMAND} -E copy ${source_path}/metacall.json ${PROJECT_OUTPUT_DIR}/plugins/core_plugin
203+
)
204+
205+
set_target_properties(${target}-create-plugin-dir
206+
PROPERTIES
207+
FOLDER "${IDE_FOLDER}"
208+
)
209+
191210
add_dependencies(${target}
211+
${target}-create-plugin-dir
192212
plugin_extension
193213
)
194214

195215
#
196216
# Deployment
197217
#
198218

199-
# Copy metacall-*.json
200-
add_custom_target(${target}-create-plugin-dir ALL
201-
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
202-
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}/plugins/core_plugin
203-
COMMAND ${CMAKE_COMMAND} -E copy ${source_path}/metacall.json ${PROJECT_OUTPUT_DIR}/plugins/core_plugin
204-
)
205-
206219
# Library
207220
install(TARGETS ${target}
208221
EXPORT "${target}-export" COMPONENT dev

source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Check if this loader is enabled
2-
if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_EXT OR NOT OPTION_BUILD_EXTENSIONS)
2+
if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_EXT OR NOT OPTION_BUILD_EXTENSIONS OR NOT OPTION_BUILD_CLI)
33
return()
44
endif()
55

@@ -130,6 +130,7 @@ add_test(NAME ${target}
130130
add_dependencies(${target}
131131
ext_loader
132132
plugin_extension
133+
core_plugin # Requires core_plugin (from CLI) for reproducing it
133134
)
134135

135136
#

0 commit comments

Comments
 (0)