From cb0c47764ab1360b06f7db9e8610b741c59d0afd Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 11 May 2019 11:56:28 -1000 Subject: [PATCH] Set directory and name properties for installing static lib PDB --- code/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 5a7838515..df12695d2 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -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}