From 50d88aa2353c296d6a49705062a1d14828096c9e Mon Sep 17 00:00:00 2001 From: Adam Kewley Date: Thu, 30 Jan 2025 11:14:38 +0100 Subject: [PATCH] Try to fix Windows' multi-configuration behavior for LIBRARY_OUTPUT_DIRECTORY --- opensimcreator/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opensimcreator/CMakeLists.txt b/opensimcreator/CMakeLists.txt index 0e3ff73b36..cae384a2bf 100644 --- a/opensimcreator/CMakeLists.txt +++ b/opensimcreator/CMakeLists.txt @@ -17,7 +17,12 @@ target_link_libraries(opensimcreator_core PRIVATE OpenSimCreator) # make the output module directly build into the python package, so that # test suites, developers, etc. can directly start using it (e.g. via REPL) set_target_properties(opensimcreator_core PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/opensimcreator + # > Multi-configuration generators (Visual Studio, Xcode, Ninja Multi-Config) append + # > a per-configuration subdirectory to the specified directory ***unless a generator + # > expression is used***. + # - https://cmake.org/cmake/help/latest/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html + LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_SOURCE_DIR}>/src/opensimcreator/ + RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_SOURCE_DIR}>/src/opensimcreator/ ) if(BUILD_TESTING)