Skip to content

Commit

Permalink
Solving bugs from core_plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Aug 3, 2022
1 parent 0e2f483 commit fffd715
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
27 changes: 20 additions & 7 deletions source/cli/plugins/core_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ set_target_properties(${target}
${DEFAULT_PROJECT_OPTIONS}
FOLDER "${IDE_FOLDER}"
BUNDLE $<$<BOOL:${APPLE}>:$<$<VERSION_GREATER:${PROJECT_OS_VERSION},8>>>

# 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}"
)

#
Expand Down Expand Up @@ -188,21 +195,27 @@ 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
)

#
# 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
Expand Down
Original file line number Diff line number Diff line change
@@ -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()

Expand Down Expand Up @@ -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
)

#
Expand Down

0 comments on commit fffd715

Please sign in to comment.