diff --git a/CMakeLists.txt b/CMakeLists.txt index 79af3772b..9e5260445 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -548,6 +548,19 @@ SET(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windo SET(CMAKE_RELWITHDEBINFO_POSTFIX "rd" CACHE STRING "add a postfix, usually empty on windows") SET(CMAKE_MINSIZEREL_POSTFIX "s" CACHE STRING "add a postfix, usually empty on windows") +# Set the build postfix extension according to what configuration is being built. +IF (CMAKE_BUILD_TYPE MATCHES "Release") + SET(CMAKE_BUILD_POSTFIX "${CMAKE_RELEASE_POSTFIX}") +ELSEIF (CMAKE_BUILD_TYPE MATCHES "MinSizeRel") + SET(CMAKE_BUILD_POSTFIX "${CMAKE_MINSIZEREL_POSTFIX}") +ELSEIF(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo") + SET(CMAKE_BUILD_POSTFIX "${CMAKE_RELWITHDEBINFO_POSTFIX}") +ELSEIF(CMAKE_BUILD_TYPE MATCHES "Debug") + SET(CMAKE_BUILD_POSTFIX "${CMAKE_DEBUG_POSTFIX}") +ELSE() + SET(CMAKE_BUILD_POSTFIX "---") +ENDIF() + IF(UNIX AND NOT WIN32) SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") diff --git a/CMakeModules/OsgCPackConfig.cmake.in b/CMakeModules/OsgCPackConfig.cmake.in index ca1b04125..0ab151d09 100644 --- a/CMakeModules/OsgCPackConfig.cmake.in +++ b/CMakeModules/OsgCPackConfig.cmake.in @@ -45,7 +45,8 @@ SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") SET(CPACK_GENERATOR "${CPACK_GENERATOR}") SET(CPACK_INSTALL_CMAKE_PROJECTS "${OpenSceneGraph_BINARY_DIR};OpenSceneGraph;${OSG_CPACK_COMPONENT};/") -SET(CPACK_INSTALL_PREFIX "${CPACK_INSTALL_PREFIX}") +SET(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") +SET(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") SET(CPACK_MODULE_PATH "${OpenSceneGraph_SOURCE_DIR}/CMakeModules;") SET(CPACK_NSIS_DISPLAY_NAME "${CMAKE_PROJECT_NAME} ${OPENSCENEGRAPH_VERSION}") SET(CPACK_NSIS_INSTALLER_ICON_CODE "") @@ -67,5 +68,4 @@ SET(CPACK_PACKAGE_VERSION_PATCH "${OPENSCENEGRAPH_PATCH_VERSION}") SET(CPACK_RESOURCE_FILE_LICENSE "${OpenSceneGraph_SOURCE_DIR}/LICENSE.txt") SET(CPACK_RESOURCE_FILE_README "${OpenSceneGraph_SOURCE_DIR}/README.txt") SET(CPACK_RESOURCE_FILE_WELCOME "${OpenSceneGraph_SOURCE_DIR}/NEWS.txt") -SET(CPACK_SET_DESTDIR "OFF") SET(CPACK_STRIP_FILES "ON") diff --git a/packaging/ld.so.conf.d/openscenegraph.conf.in b/packaging/ld.so.conf.d/openscenegraph.conf.in index 78c3b6914..51d1e5a7b 100644 --- a/packaging/ld.so.conf.d/openscenegraph.conf.in +++ b/packaging/ld.so.conf.d/openscenegraph.conf.in @@ -1,2 +1,2 @@ # openscenegraph library configuration -${CMAKE_INSTALL_PREFIX}lib${LIB_POSTFIX} +${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX} diff --git a/packaging/pkgconfig/openscenegraph-osg.pc.in b/packaging/pkgconfig/openscenegraph-osg.pc.in index 83d2bf090..2ebe47ddb 100644 --- a/packaging/pkgconfig/openscenegraph-osg.pc.in +++ b/packaging/pkgconfig/openscenegraph-osg.pc.in @@ -10,5 +10,5 @@ Description: 3D scenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openthreads Conflicts: -Libs: -L${libdir} -losg +Libs: -L${libdir} -losg@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgAnimation.pc.in b/packaging/pkgconfig/openscenegraph-osgAnimation.pc.in index 49148a261..eb9cb85ea 100644 --- a/packaging/pkgconfig/openscenegraph-osgAnimation.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgAnimation.pc.in @@ -10,5 +10,5 @@ Description: Skinning and morphing library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osg openscenegraph-osgText openscenegraph-osgGA openscenegraph-osgViewer openthreads Conflicts: -Libs: -L${libdir} -losgAnimation +Libs: -L${libdir} -losgAnimation@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgDB.pc.in b/packaging/pkgconfig/openscenegraph-osgDB.pc.in index 7a7825997..0015a529e 100644 --- a/packaging/pkgconfig/openscenegraph-osgDB.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgDB.pc.in @@ -10,5 +10,5 @@ Description: File format reading library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgDB +Libs: -L${libdir} -losgDB@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgFX.pc.in b/packaging/pkgconfig/openscenegraph-osgFX.pc.in index ffbf22fb3..92ce51eda 100644 --- a/packaging/pkgconfig/openscenegraph-osgFX.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgFX.pc.in @@ -10,5 +10,5 @@ Description: Special effects library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgDB openscenegraph-osgUtil openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgFX +Libs: -L${libdir} -losgFX@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgGA.pc.in b/packaging/pkgconfig/openscenegraph-osgGA.pc.in index e6a915cb6..17d7125b2 100644 --- a/packaging/pkgconfig/openscenegraph-osgGA.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgGA.pc.in @@ -10,5 +10,5 @@ Description: GUI event library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgDB openscenegraph-osgUtil openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgGA +Libs: -L${libdir} -losgGA@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgManipulator.pc.in b/packaging/pkgconfig/openscenegraph-osgManipulator.pc.in index 30549fbe6..6ef410c06 100644 --- a/packaging/pkgconfig/openscenegraph-osgManipulator.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgManipulator.pc.in @@ -10,5 +10,5 @@ Description: Manipulator library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgUtil openscenegraph-osgGA openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgManipulator +Libs: -L${libdir} -losgManipulator@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgParticle.pc.in b/packaging/pkgconfig/openscenegraph-osgParticle.pc.in index 8bd0f44cb..2f504e228 100644 --- a/packaging/pkgconfig/openscenegraph-osgParticle.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgParticle.pc.in @@ -10,5 +10,5 @@ Description: Particle system library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgDB openscenegraph-osgUtil openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgParticle +Libs: -L${libdir} -losgParticle@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgQt.pc.in b/packaging/pkgconfig/openscenegraph-osgQt.pc.in index 463cdb8d7..7b310e49f 100644 --- a/packaging/pkgconfig/openscenegraph-osgQt.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgQt.pc.in @@ -10,5 +10,5 @@ Description: osgQt utility library. Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgWidget openscenegraph-osgDB openscenegraph-osgUtil openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgQt +Libs: -L${libdir} -losgQt@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgShadow.pc.in b/packaging/pkgconfig/openscenegraph-osgShadow.pc.in index f4c32a467..00c546244 100644 --- a/packaging/pkgconfig/openscenegraph-osgShadow.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgShadow.pc.in @@ -10,5 +10,5 @@ Description: Shadow techniques library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgUtil openscenegraph-osgDB openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgShadow +Libs: -L${libdir} -losgShadow@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgSim.pc.in b/packaging/pkgconfig/openscenegraph-osgSim.pc.in index de2354cb5..68e6f2b12 100644 --- a/packaging/pkgconfig/openscenegraph-osgSim.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgSim.pc.in @@ -10,5 +10,5 @@ Description: Simulator utility library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgText openscenegraph-osgDB openscenegraph-osgUtil openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgSim +Libs: -L${libdir} -losgSim@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgTerrain.pc.in b/packaging/pkgconfig/openscenegraph-osgTerrain.pc.in index 47ca61e4e..549494b29 100644 --- a/packaging/pkgconfig/openscenegraph-osgTerrain.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgTerrain.pc.in @@ -10,5 +10,5 @@ Description: Terrain library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgUtil openscenegraph-osgDB openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgTerrain +Libs: -L${libdir} -losgTerrain@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgText.pc.in b/packaging/pkgconfig/openscenegraph-osgText.pc.in index 7d67b51bb..68f4b74ab 100644 --- a/packaging/pkgconfig/openscenegraph-osgText.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgText.pc.in @@ -10,5 +10,5 @@ Description: Text rendering library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgDB openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgText +Libs: -L${libdir} -losgText@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgUtil.pc.in b/packaging/pkgconfig/openscenegraph-osgUtil.pc.in index 129f97d19..4b1950d4b 100644 --- a/packaging/pkgconfig/openscenegraph-osgUtil.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgUtil.pc.in @@ -10,5 +10,5 @@ Description: Utility library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgUtil +Libs: -L${libdir} -losgUtil@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgViewer.pc.in b/packaging/pkgconfig/openscenegraph-osgViewer.pc.in index b7c5b80e5..6172d0db4 100644 --- a/packaging/pkgconfig/openscenegraph-osgViewer.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgViewer.pc.in @@ -10,5 +10,5 @@ Description: Windowing system setup, thread scene manager library for Opensceneg Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgText openscenegraph-osgDB openscenegraph-osgUtil openscenegraph-osgGA openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgViewer +Libs: -L${libdir} -losgViewer@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgVolume.pc.in b/packaging/pkgconfig/openscenegraph-osgVolume.pc.in index 6166bdb8c..5a283826f 100644 --- a/packaging/pkgconfig/openscenegraph-osgVolume.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgVolume.pc.in @@ -10,5 +10,5 @@ Description: Volume library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgUtil openscenegraph-osgDB openscenegraph-osgGA openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgVolume +Libs: -L${libdir} -losgVolume@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph-osgWidget.pc.in b/packaging/pkgconfig/openscenegraph-osgWidget.pc.in index e136527ba..4e7eaea5d 100644 --- a/packaging/pkgconfig/openscenegraph-osgWidget.pc.in +++ b/packaging/pkgconfig/openscenegraph-osgWidget.pc.in @@ -10,5 +10,5 @@ Description: Windowing toolkit library for Openscenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openscenegraph-osgText openscenegraph-osgViewer openscenegraph-osgDB openscenegraph-osgGA openscenegraph-osg openthreads Conflicts: -Libs: -L${libdir} -losgWidget +Libs: -L${libdir} -losgWidget@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openscenegraph.pc.in b/packaging/pkgconfig/openscenegraph.pc.in index b333015a9..784ac4688 100644 --- a/packaging/pkgconfig/openscenegraph.pc.in +++ b/packaging/pkgconfig/openscenegraph.pc.in @@ -10,5 +10,19 @@ Description: 3D scenegraph Version: @OPENSCENEGRAPH_VERSION@ Requires: openthreads Conflicts: -Libs: -L${libdir} -losg -losgDB -losgFX -losgGA -losgParticle -losgSim -losgText -losgUtil -losgTerrain -losgManipulator -losgViewer -losgWidget -losgShadow -losgAnimation -losgVolume +Libs: -L${libdir} -losg@CMAKE_BUILD_POSTFIX@ \ + -losgDB@CMAKE_BUILD_POSTFIX@ \ + -losgFX@CMAKE_BUILD_POSTFIX@ \ + -losgGA@CMAKE_BUILD_POSTFIX@ \ + -losgParticle@CMAKE_BUILD_POSTFIX@ \ + -losgSim@CMAKE_BUILD_POSTFIX@ \ + -losgText@CMAKE_BUILD_POSTFIX@ \ + -losgUtil@CMAKE_BUILD_POSTFIX@ \ + -losgTerrain@CMAKE_BUILD_POSTFIX@ \ + -losgManipulator@CMAKE_BUILD_POSTFIX@ \ + -losgViewer@CMAKE_BUILD_POSTFIX@ \ + -losgWidget@CMAKE_BUILD_POSTFIX@ \ + -losgShadow@CMAKE_BUILD_POSTFIX@ \ + -losgAnimation@CMAKE_BUILD_POSTFIX@ \ + -losgVolume@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir} diff --git a/packaging/pkgconfig/openthreads.pc.in b/packaging/pkgconfig/openthreads.pc.in index efe72b773..125c4fc7a 100644 --- a/packaging/pkgconfig/openthreads.pc.in +++ b/packaging/pkgconfig/openthreads.pc.in @@ -10,5 +10,5 @@ Description: Object-Oriented (OO) thread interface for C++ programmers Version: @OPENTHREADS_VERSION@ Requires: Conflicts: -Libs: -L${libdir} -lOpenThreads +Libs: -L${libdir} -lOpenThreads@CMAKE_BUILD_POSTFIX@ Cflags: -I${includedir}