From 1da5d8ddded861c8b8a88f7aa2215111fc1640be Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 27 Jul 2021 14:56:48 +0200 Subject: [PATCH] robust installation of pdb files --- CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30e885a..37190c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -416,11 +416,6 @@ install(TARGETS ${name} LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} ) -if(MSVC) - # install(FILES $ DESTINATION lib OPTIONAL) - INSTALL(FILES ${PROJECT_BINARY_DIR}/${name}.dir/Debug/${name}.pdb - DESTINATION lib CONFIGURATIONS Debug ) -endif() #------------------------------------------------------------------------ # Dynamic Library @@ -445,6 +440,9 @@ if (BUILD_SHARED_LIB) ARCHIVE DESTINATION ${LIB_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) + if(MSVC) + install(FILES $ DESTINATION ${LIB_INSTALL_DIR} OPTIONAL) + endif() if (TIDY_CONSOLE_SHARED) # user wants shared/dll linkage list ( APPEND add_LIBS ${name} ) endif ()