From aae4f221632bbc7e69061ab16bcc0c3d22e39af7 Mon Sep 17 00:00:00 2001 From: Stephan van Alste Date: Wed, 6 Mar 2013 09:38:48 +0100 Subject: [PATCH] Do not install non existant pdb file in release build mode --- CMakeModules/ModuleInstall.cmake | 4 ++-- CMakeModules/OsgMacroUtils.cmake | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake index 07b5ddabb..1e10bcae1 100644 --- a/CMakeModules/ModuleInstall.cmake +++ b/CMakeModules/ModuleInstall.cmake @@ -32,10 +32,10 @@ INSTALL( ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev ) -IF(MSVC) +IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") GET_TARGET_PROPERTY(PREFIX ${LIB_NAME} PREFIX) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}${LIB_NAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph) -ENDIF(MSVC) +ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") IF(NOT OSG_COMPILE_FRAMEWORKS) INSTALL ( diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake index d2d7fb7a3..89113de36 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake @@ -326,9 +326,9 @@ 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 NOT CMAKE_BUILD_TYPE STREQUAL "Release") INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) - ENDIF(MSVC) + ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ELSE(WIN32) INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT} @@ -431,9 +431,9 @@ MACRO(SETUP_APPLICATION APPLICATION_NAME) INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin BUNDLE DESTINATION bin) ELSE(APPLE) INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph ) - IF(MSVC) + IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_NAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph) - ENDIF(MSVC) + ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ENDIF(APPLE) ENDMACRO(SETUP_APPLICATION) @@ -463,9 +463,9 @@ MACRO(SETUP_EXAMPLE EXAMPLE_NAME) INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin ) ELSE(APPLE) INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples ) - IF(MSVC) + IF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_TARGETNAME}${CMAKE_BUILD_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples) - ENDIF(MSVC) + ENDIF(MSVC AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") ENDIF(APPLE) ENDMACRO(SETUP_EXAMPLE)