Skip to content

Commit ab6b76d

Browse files
authored
Merge pull request #980 from SpaceIm/fix/cmake-pdb
CMake: robust installation of pdb files
2 parents 514ab01 + 1da5d8d commit ab6b76d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

CMakeLists.txt

+3-5
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,6 @@ install(TARGETS ${name}
416416
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
417417
)
418418
install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} )
419-
if(MSVC)
420-
# install(FILES $<TARGET_PDB_FILE:${name}> DESTINATION lib OPTIONAL)
421-
INSTALL(FILES ${PROJECT_BINARY_DIR}/${name}.dir/Debug/${name}.pdb
422-
DESTINATION lib CONFIGURATIONS Debug )
423-
endif()
424419

425420
#------------------------------------------------------------------------
426421
# Dynamic Library
@@ -445,6 +440,9 @@ if (BUILD_SHARED_LIB)
445440
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
446441
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
447442
)
443+
if(MSVC)
444+
install(FILES $<TARGET_PDB_FILE:tidy-share> DESTINATION ${LIB_INSTALL_DIR} OPTIONAL)
445+
endif()
448446
if (TIDY_CONSOLE_SHARED) # user wants shared/dll linkage
449447
list ( APPEND add_LIBS ${name} )
450448
endif ()

0 commit comments

Comments
 (0)