Set directory and name properties for installing static lib PDB

pull/2458/head
Jack Andersen 2019-05-11 11:56:28 -10:00
parent 0898484d45
commit cb0c47764a
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}