robust installation of pdb files

This commit is contained in:
SpaceIm 2021-07-27 14:56:48 +02:00
parent c42ec040c9
commit 1da5d8ddde

View file

@ -416,11 +416,6 @@ install(TARGETS ${name}
LIBRARY DESTINATION ${LIB_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR}
) )
install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} ) install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} )
if(MSVC)
# install(FILES $<TARGET_PDB_FILE:${name}> DESTINATION lib OPTIONAL)
INSTALL(FILES ${PROJECT_BINARY_DIR}/${name}.dir/Debug/${name}.pdb
DESTINATION lib CONFIGURATIONS Debug )
endif()
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# Dynamic Library # Dynamic Library
@ -445,6 +440,9 @@ if (BUILD_SHARED_LIB)
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR}
) )
if(MSVC)
install(FILES $<TARGET_PDB_FILE:tidy-share> DESTINATION ${LIB_INSTALL_DIR} OPTIONAL)
endif()
if (TIDY_CONSOLE_SHARED) # user wants shared/dll linkage if (TIDY_CONSOLE_SHARED) # user wants shared/dll linkage
list ( APPEND add_LIBS ${name} ) list ( APPEND add_LIBS ${name} )
endif () endif ()