Revert "Try bindir, might revert"

This reverts commit ff8f761a2b.
This commit is contained in:
Jeremy 2023-10-08 22:03:14 -04:00
parent ff8f761a2b
commit 5bbadbf5b2
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
4 changed files with 28 additions and 2 deletions

View File

@ -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()

View File

@ -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
$<TARGET_FILE:cpptrace>
$<TARGET_FILE_DIR:main>
)
endif()

View File

@ -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
$<TARGET_FILE:cpptrace>
$<TARGET_FILE_DIR:main>
)
endif()

View File

@ -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 $<TARGET_RUNTIME_DLLS:speedtest> $<TARGET_FILE_DIR:speedtest>
COMMAND_EXPAND_LISTS
)
endif()