From ac36649ed68f38f3a11a8962356c70d52407e951 Mon Sep 17 00:00:00 2001 From: Sebastian Messerschmidt Date: Fri, 21 Jul 2017 11:06:22 +0200 Subject: [PATCH 1/2] FIX: attempting to install pdb-files for static targets caused failing INSTALL --- CMakeModules/ModuleInstall.cmake | 4 ++-- CMakeModules/OsgMacroUtils.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake index 8369d59eb..be80fd1db 100644 --- a/CMakeModules/ModuleInstall.cmake +++ b/CMakeModules/ModuleInstall.cmake @@ -32,11 +32,11 @@ INSTALL( ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev ) -IF(MSVC) +IF(MSVC AND DYNAMIC_OPENSCENEGRAPH) GET_TARGET_PROPERTY(PREFIX ${LIB_NAME} PREFIX) INSTALL(FILES ${OUTPUT_BINDIR}/${PREFIX}${LIB_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS RelWithDebInfo) INSTALL(FILES ${OUTPUT_BINDIR}/${PREFIX}${LIB_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS Debug) -ENDIF(MSVC) +ENDIF(MSVC AND DYNAMIC_OPENSCENEGRAPH) IF(NOT OSG_COMPILE_FRAMEWORKS) INSTALL ( diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake index 81998f101..8e397d685 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake @@ -326,7 +326,7 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME) RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT} ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) - IF(MSVC) + IF(MSVC AND DYNAMIC_OPENSCENEGRAPH) INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS RelWithDebInfo) INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS Debug) ENDIF(MSVC) From 1d7d1dda42838154290cd1b860de25975d1bab49 Mon Sep 17 00:00:00 2001 From: Sebastian Messerschmidt Date: Fri, 21 Jul 2017 13:12:38 +0200 Subject: [PATCH 2/2] FIX: missing change in ENDIF --- CMakeModules/OsgMacroUtils.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake index 8e397d685..3b751326d 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake @@ -329,7 +329,7 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME) IF(MSVC AND DYNAMIC_OPENSCENEGRAPH) INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS RelWithDebInfo) INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS Debug) - ENDIF(MSVC) + ENDIF(MSVC AND DYNAMIC_OPENSCENEGRAPH) ELSE(WIN32) INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}