fix(compilation): Use install(DIRECTORY...) instead of FILES so all simulators packaged (#1912)

This allows the list of files to be resolved at the last moment versus when cmake is executed first.
This commit is contained in:
Raphael Coeffic
2022-04-28 15:10:09 +10:00
committed by GitHub
parent 7af253145f
commit 8c0c667ab7
2 changed files with 9 additions and 11 deletions
+6
View File
@@ -58,6 +58,12 @@ if(Qt5Widgets_FOUND)
endif()
endif()
add_custom_command(
TARGET ${SIMULATOR_TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/plugins/
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${SIMULATOR_TARGET}> ${CMAKE_BINARY_DIR}/plugins/
)
# Introduced at 2.5 - TODO replace with a code change
# When compiled shared simulators using libopenui and Companion have classes named MainWindow