Improve debug builds for MSVC (#443)

* Add -d suffix for debug libraries

* Export PDB files for each Debug library
This commit is contained in:
Jan Haller 2020-10-30 10:41:54 +01:00 committed by GitHub
parent 9337e12418
commit e679507845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 0 deletions

View File

@ -7,6 +7,7 @@ else()
endif()
add_library(RecastNavigation::DebugUtils ALIAS DebugUtils)
set_target_properties(DebugUtils PROPERTIES DEBUG_POSTFIX -d)
set(DebugUtils_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
@ -23,6 +24,8 @@ target_link_libraries(DebugUtils
set_target_properties(DebugUtils PROPERTIES
SOVERSION ${SOVERSION}
VERSION ${VERSION}
COMPILE_PDB_OUTPUT_DIRECTORY .
COMPILE_PDB_NAME "DebugUtils-d"
)
install(TARGETS DebugUtils
@ -34,3 +37,4 @@ install(TARGETS DebugUtils
file(GLOB INCLUDES Include/*.h)
install(FILES ${INCLUDES} DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation)
install(FILES "$<TARGET_FILE_DIR:DebugUtils>/DebugUtils-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib")

View File

@ -7,6 +7,7 @@ else()
endif()
add_library(RecastNavigation::Detour ALIAS Detour)
set_target_properties(Detour PROPERTIES DEBUG_POSTFIX -d)
set(Detour_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
@ -17,6 +18,8 @@ target_include_directories(Detour PUBLIC
set_target_properties(Detour PROPERTIES
SOVERSION ${SOVERSION}
VERSION ${VERSION}
COMPILE_PDB_OUTPUT_DIRECTORY .
COMPILE_PDB_NAME "Detour-d"
)
install(TARGETS Detour
@ -28,3 +31,4 @@ install(TARGETS Detour
file(GLOB INCLUDES Include/*.h)
install(FILES ${INCLUDES} DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation)
install(FILES "$<TARGET_FILE_DIR:Detour>/Detour-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib")

View File

@ -7,6 +7,7 @@ else ()
endif ()
add_library(RecastNavigation::DetourCrowd ALIAS DetourCrowd)
set_target_properties(DetourCrowd PROPERTIES DEBUG_POSTFIX -d)
set(DetourCrowd_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
@ -21,6 +22,8 @@ target_link_libraries(DetourCrowd
set_target_properties(DetourCrowd PROPERTIES
SOVERSION ${SOVERSION}
VERSION ${VERSION}
COMPILE_PDB_OUTPUT_DIRECTORY .
COMPILE_PDB_NAME "DetourCrowd-d"
)
install(TARGETS DetourCrowd
@ -32,3 +35,4 @@ install(TARGETS DetourCrowd
file(GLOB INCLUDES Include/*.h)
install(FILES ${INCLUDES} DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation)
install(FILES "$<TARGET_FILE_DIR:DetourCrowd>/DetourCrowd-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib")

View File

@ -7,6 +7,7 @@ else ()
endif ()
add_library(RecastNavigation::DetourTileCache ALIAS DetourTileCache)
set_target_properties(DetourTileCache PROPERTIES DEBUG_POSTFIX -d)
set(DetourTileCache_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
@ -21,6 +22,8 @@ target_link_libraries(DetourTileCache
set_target_properties(DetourTileCache PROPERTIES
SOVERSION ${SOVERSION}
VERSION ${VERSION}
COMPILE_PDB_OUTPUT_DIRECTORY .
COMPILE_PDB_NAME "DetourTileCache-d"
)
@ -33,3 +36,4 @@ install(TARGETS DetourTileCache
file(GLOB INCLUDES Include/*.h)
install(FILES ${INCLUDES} DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation)
install(FILES "$<TARGET_FILE_DIR:DetourTileCache>/DetourTileCache-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib")

View File

@ -7,6 +7,7 @@ else ()
endif ()
add_library(RecastNavigation::Recast ALIAS Recast)
set_target_properties(Recast PROPERTIES DEBUG_POSTFIX -d)
set(Recast_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
@ -17,6 +18,8 @@ target_include_directories(Recast PUBLIC
set_target_properties(Recast PROPERTIES
SOVERSION ${SOVERSION}
VERSION ${VERSION}
COMPILE_PDB_OUTPUT_DIRECTORY .
COMPILE_PDB_NAME "Recast-d"
)
install(TARGETS Recast
@ -28,3 +31,4 @@ install(TARGETS Recast
file(GLOB INCLUDES Include/*.h)
install(FILES ${INCLUDES} DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation)
install(FILES "$<TARGET_FILE_DIR:Recast>/Recast-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib")