aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--test/unit_tests/CMakeLists.txt9
2 files changed, 10 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 396356d..4d930a9 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,7 +1,9 @@
add_executable(echo echo.cpp)
set_target_properties(echo PROPERTIES OUTPUT_NAME winapi-common-test-echo)
install(TARGETS echo RUNTIME DESTINATION bin)
-install_pdbs(TARGETS echo DESTINATION bin)
+if(MSVC)
+ install(FILES $<TARGET_PDB_FILE:echo> DESTINATION bin OPTIONAL)
+endif()
if(MINGW)
target_compile_options(echo PRIVATE -municode)
target_link_libraries(echo PRIVATE -municode)
diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt
index b8c8c7c..d993b3b 100644
--- a/test/unit_tests/CMakeLists.txt
+++ b/test/unit_tests/CMakeLists.txt
@@ -8,7 +8,6 @@ set_target_properties(unit_tests PROPERTIES OUTPUT_NAME winapi-common-unit-tests
target_link_libraries(unit_tests PRIVATE winapi_common winapi_utf8)
target_link_libraries(unit_tests PRIVATE Boost::disable_autolinking Boost::unit_test_framework)
install(TARGETS unit_tests RUNTIME DESTINATION bin)
-install_pdbs(TARGETS unit_tests DESTINATION bin)
file(GLOB worker_src CONFIGURE_DEPENDS "worker/*.cpp")
add_executable(worker ${worker_src} ${shared_src})
@@ -16,7 +15,13 @@ set_target_properties(worker PROPERTIES OUTPUT_NAME winapi-common-test-worker)
target_link_libraries(worker PRIVATE winapi_common winapi_utf8)
target_link_libraries(worker PRIVATE Boost::disable_autolinking Boost::boost)
install(TARGETS worker RUNTIME DESTINATION bin)
-install_pdbs(TARGETS worker DESTINATION bin)
+
+if(MSVC)
+ install(FILES
+ $<TARGET_PDB_FILE:unit_tests>
+ $<TARGET_PDB_FILE:worker>
+ DESTINATION bin OPTIONAL)
+endif()
find_package(Python3 REQUIRED COMPONENTS Interpreter)