Merge pull request #2458 from jackoalan/pdb-install-fix

Set directory and name properties for installing static lib PDB
pull/2462/head^2
Kim Kulling 2019-05-16 17:03:36 +02:00 committed by GitHub
commit 2ba3d956d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -1138,6 +1138,16 @@ if (ASSIMP_ANDROID_JNIIOSYSTEM)
ENDIF(ASSIMP_ANDROID_JNIIOSYSTEM)
if(MSVC AND ASSIMP_INSTALL_PDB)
# When only the static library is built, these properties must
# be set to ensure the static lib .pdb is staged for installation.
IF(NOT BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES( assimp PROPERTIES
COMPILE_PDB_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMPILE_PDB_NAME assimp${LIBRARY_SUFFIX}
COMPILE_PDB_NAME_DEBUG assimp${LIBRARY_SUFFIX}${CMAKE_DEBUG_POSTFIX}
)
ENDIF()
IF(CMAKE_GENERATOR MATCHES "^Visual Studio")
install(FILES ${Assimp_BINARY_DIR}/code/Debug/assimp${LIBRARY_SUFFIX}${CMAKE_DEBUG_POSTFIX}.pdb
DESTINATION ${ASSIMP_LIB_INSTALL_DIR}