From 0ab565ab02ba4713a745b823152f470f6c2d0287 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 31 Jan 2021 21:48:36 +0100 Subject: [PATCH] Properly set the build directory of all plugins and libimhex --- cmake/build_helpers.cmake | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index c8fcf468e..587687bdd 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -139,20 +139,13 @@ endmacro() macro(createPackage) file(MAKE_DIRECTORY "plugins") - foreach (plugin IN LISTS PLUGINS) add_subdirectory("plugins/${plugin}") - add_custom_command(TARGET imhex POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - $ - $/plugins/$ - DEPENDS ${plugin}) + set_target_properties(${plugin} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins) + add_dependencies(imhex ${plugin}) endforeach() - add_custom_command(TARGET imhex POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different - $ - $) + set_target_properties(libimhex PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) if (WIN32) # Install binaries directly in the prefix, usually C:\Program Files\ImHex.