diff --git a/CMakeLists.txt b/CMakeLists.txt index ce5dbcf..175bb10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -399,7 +399,7 @@ if(NOT CMAKE_SKIP_INSTALL_RULES) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else() install( @@ -408,7 +408,7 @@ if(NOT CMAKE_SKIP_INSTALL_RULES) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ) endif() diff --git a/test/add_subdirectory-integration/CMakeLists.txt b/test/add_subdirectory-integration/CMakeLists.txt index cd425dd..94bd9df 100644 --- a/test/add_subdirectory-integration/CMakeLists.txt +++ b/test/add_subdirectory-integration/CMakeLists.txt @@ -7,3 +7,12 @@ add_executable(main main.cpp) add_subdirectory(cpptrace) target_link_libraries(main cpptrace) target_compile_features(main PRIVATE cxx_std_11) + +if(WIN32) + add_custom_command( + TARGET main POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ + $ + ) +endif() diff --git a/test/fetchcontent-integration/CMakeLists.txt b/test/fetchcontent-integration/CMakeLists.txt index 134bfd1..31d3453 100644 --- a/test/fetchcontent-integration/CMakeLists.txt +++ b/test/fetchcontent-integration/CMakeLists.txt @@ -15,3 +15,12 @@ FetchContent_Declare( FetchContent_MakeAvailable(cpptrace) target_link_libraries(main cpptrace) target_compile_features(main PRIVATE cxx_std_11) + +if(WIN32) + add_custom_command( + TARGET main POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ + $ + ) +endif() diff --git a/test/speedtest/CMakeLists.txt b/test/speedtest/CMakeLists.txt index ce95b7b..57ed6fa 100644 --- a/test/speedtest/CMakeLists.txt +++ b/test/speedtest/CMakeLists.txt @@ -45,3 +45,11 @@ target_link_libraries( GTest::gtest_main cpptrace::cpptrace ) + +if(WIN32) + add_custom_command( + TARGET speedtest POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $ + COMMAND_EXPAND_LISTS + ) +endif()