2008-12-15 22:07:29 +08:00
#
# collect a descriptive system specification string <system>-<arch>-<compiler>
#
2008-12-12 19:01:09 +08:00
2008-12-15 22:07:29 +08:00
# resolve architecture. The reason i "change" i686 to i386 is that debian packages
# require i386 so this is for the future
IF ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686" )
SET ( SYSTEM_ARCH "i386" )
ELSE ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686" )
SET ( SYSTEM_ARCH ${ CMAKE_SYSTEM_PROCESSOR } )
ENDIF ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686" )
# set a default system name - use CMake setting (Linux|Windows|...)
SET ( SYSTEM_NAME ${ CMAKE_SYSTEM_NAME } )
#message(STATUS "CMAKE_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}")
#message(STATUS "CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}")
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
# Platform specific settings.
# Includes setting the compiler and specifying debug/release build
# for windows the SYSTEM_NAME is set win32/64 instead of windows
IF ( MSVC )
#Visual C++, 32-bit, version 6.0 1200
#Visual C++, 32-bit, version .net 2002 1300
#Visual C++, 32-bit, version .net 2003 1310
#Visual C++, 32-bit, version 2005 1400 (vc80)
#Visual C++, 32-bit, version 2005 SP1 1400 (vc80_sp1)
#Visual C++, 32-bit, version 2008 1500 (vc90)
IF ( MSVC_VERSION EQUAL 1500 )
SET ( OSG_CPACK_COMPILER "vc90" )
ELSE ( MSVC_VERSION EQUAL 1500 )
# This if doesn't detect my 2005 vc80sp1 compiler. Have to rely on COMPILER_2005
IF ( MSVC_VERSION EQUAL 1400 )
2008-12-15 22:07:29 +08:00
SET ( OSG_CPACK_COMPILER "vc80" )
ELSE ( MSVC_VERSION EQUAL 1400 )
IF ( CMAKE_COMPILER_2005 )
SET ( OSG_CPACK_COMPILER "vc80" )
ENDIF ( CMAKE_COMPILER_2005 )
ENDIF ( MSVC_VERSION EQUAL 1400 )
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
ENDIF ( MSVC_VERSION EQUAL 1500 )
IF ( MSVC_VERSION EQUAL 1310 )
SET ( OSG_CPACK_COMPILER "vc70" )
ENDIF ( MSVC_VERSION EQUAL 1310 )
# check arch bitcount
IF ( CMAKE_CL_64 )
SET ( SYSTEM_NAME "win64" )
ELSE ( CMAKE_CL_64 )
SET ( SYSTEM_NAME "win32" )
ENDIF ( CMAKE_CL_64 )
ELSE ( MSVC )
# on un*x an empty CMAKE_BUILD_TYPE means release
IF ( CMAKE_BUILD_TYPE )
SET ( SYSTEM_BUILD_TYPE ${ CMAKE_BUILD_TYPE } )
ELSE ( CMAKE_BUILD_TYPE )
SET ( SYSTEM_BUILD_TYPE "Release" )
ENDIF ( CMAKE_BUILD_TYPE )
ENDIF ( MSVC )
# expose the compiler setting to the user
SET ( OSG_CPACK_COMPILER "${OSG_CPACK_COMPILER}" CACHE STRING "This ia short string (vc90, vc80sp1, gcc-4.3, ...) describing your compiler. The string is used for creating package filenames" )
2008-12-15 22:07:29 +08:00
IF ( OSG_CPACK_COMPILER )
SET ( OSG_CPACK_SYSTEM_SPEC_STRING ${ SYSTEM_NAME } - ${ SYSTEM_ARCH } - ${ OSG_CPACK_COMPILER } )
ELSE ( OSG_CPACK_COMPILER )
SET ( OSG_CPACK_SYSTEM_SPEC_STRING ${ SYSTEM_NAME } - ${ SYSTEM_ARCH } )
ENDIF ( OSG_CPACK_COMPILER )
2008-12-12 19:01:09 +08:00
## variables that apply to all packages
2008-12-16 19:43:28 +08:00
SET ( CPACK_PACKAGE_NAME ${ CMAKE_PROJECT_NAME } )
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
#SET(CPACK_PACKAGE_FILE_NAME "openscenegraph-all-${OPENSCENEGRAPH_VERSION}-${OSG_CPACK_SYSTEM_SPEC_STRING}")
SET ( CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}" )
2008-12-12 19:01:09 +08:00
SET ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "The OpenSceneGraph is an open source high performance 3d graphics toolkit" )
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
SET ( CPACK_PACKAGE_VENDOR "The OpenSceneGraph developers and contributors lead by Robert Osfield" )
2008-12-12 19:01:09 +08:00
SET ( CPACK_PACKAGE_VERSION_MAJOR ${ OPENSCENEGRAPH_MAJOR_VERSION } )
SET ( CPACK_PACKAGE_VERSION_MINOR ${ OPENSCENEGRAPH_MINOR_VERSION } )
SET ( CPACK_PACKAGE_VERSION_PATCH ${ OPENSCENEGRAPH_PATCH_VERSION } )
SET ( CPACK_PACKAGE_INSTALL_DIRECTORY "OpenSceneGraph-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}" )
SET ( CPACK_TOPLEVEL_TAG ${ CPACK_PACKAGE_NAME } - ${ OPENSCENEGRAPH_VERSION } )
2008-12-15 22:07:29 +08:00
# these goes for all platforms. Setting these stops the CPack.cmake script from generating options about other package compression formats (.z .tz, etc.)
SET ( CPACK_GENERATOR "TGZ" )
SET ( CPACK_SOURCE_GENERATOR "TGZ" )
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
# for msvc we use it's internally defined variable to get the configuration (debug,release, ...)
IF ( MSVC )
SET ( OSG_CPACK_CONFIGURATION "$(OutDir)" )
SET ( PACKAGE_TARGET_PREFIX "Package " )
ELSE ( MSVC )
SET ( OSG_CPACK_CONFIGURATION "${SYSTEM_BUILD_TYPE}" )
SET ( PACKAGE_TARGET_PREFIX "package_" )
ENDIF ( MSVC )
# Get all defined components
IF ( CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION GREATER 4 AND CMAKE_PATCH_VERSION GREATER 0 )
GET_CMAKE_PROPERTY ( CPACK_COMPONENTS_ALL COMPONENTS )
ELSE ( CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION GREATER 4 AND CMAKE_PATCH_VERSION GREATER 0 )
# cmake 2.6.0 didn't supply the COMPONENTS property.
# I set it manually to be the packages that can always be packaged
MESSAGE ( "When building packages please consider using cmake version 2.6.1 or above" )
SET ( CPACK_COMPONENTS_ALL libopenscenegraph openscenegraph libopenthreads libopenscenegraph-dev libopenthreads-dev )
ENDIF ( CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION GREATER 4 AND CMAKE_PATCH_VERSION GREATER 0 )
# Create a target that will be used to generate all packages defined below
SET ( PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL" )
ADD_CUSTOM_TARGET ( ${ PACKAGE_ALL_TARGETNAME } )
MACRO ( GENERATE_PACKAGING_TARGET package_name )
SET ( CPACK_PACKAGE_NAME ${ package_name } )
2008-12-16 19:43:28 +08:00
# the doc packages don't need a system-arch specification
IF ( ${ package } MATCHES -doc )
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
SET ( OSG_PACKAGE_FILE_NAME ${ package_name } - ${ OPENSCENEGRAPH_VERSION } )
2008-12-16 19:43:28 +08:00
ELSE ( ${ package } MATCHES -doc )
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
SET ( OSG_PACKAGE_FILE_NAME ${ package_name } - ${ OPENSCENEGRAPH_VERSION } - ${ OSG_CPACK_SYSTEM_SPEC_STRING } - ${ OSG_CPACK_CONFIGURATION } )
2008-12-16 19:43:28 +08:00
ENDIF ( ${ package } MATCHES -doc )
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
CONFIGURE_FILE ( "${OpenSceneGraph_SOURCE_DIR}/CMakeModules/OsgCPackConfig.cmake.in" "${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake" IMMEDIATE )
2008-12-12 19:01:09 +08:00
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
SET ( PACKAGE_TARGETNAME "${PACKAGE_TARGET_PREFIX}${package_name}" )
# Create a target that creates the current package
ADD_CUSTOM_TARGET ( ${ PACKAGE_TARGETNAME } )
ADD_CUSTOM_COMMAND ( TARGET ${ PACKAGE_TARGETNAME }
C O M M A N D $ { C M A K E _ C P A C K _ C O M M A N D } - C $ { O S G _ C P A C K _ C O N F I G U R A T I O N } - - c o n f i g $ { O p e n S c e n e G r a p h _ B I N A R Y _ D I R } / C P a c k C o n f i g - $ { p a c k a g e _ n a m e } . c m a k e
C O M M E N T " R u n C P a c k p a c k a g i n g f o r $ { p a c k a g e _ n a m e } . . . "
)
ADD_CUSTOM_COMMAND ( TARGET ${ PACKAGE_ALL_TARGETNAME }
C O M M A N D $ { C M A K E _ C P A C K _ C O M M A N D } - C $ { O S G _ C P A C K _ C O N F I G U R A T I O N } - - c o n f i g $ { O p e n S c e n e G r a p h _ B I N A R Y _ D I R } / C P a c k C o n f i g - $ { p a c k a g e _ n a m e } . c m a k e
2008-12-12 19:01:09 +08:00
)
From Mattias Helsing, "'ve finally finished the rework of the packaging support. It is
streamlined for tgz and has most of the features that Robert, J-S and
Sukender requested in december. I have an idea of how to discover the
vc80 sp1 or not but haven't had time to implement. The script is
completely reworked and now doesn't include cmakes' bundled
CPack.cmake script at all. In summary:
* filenames are
<package>-<osgversion>-<platform>-<arch>[-compiler]-<configuration>.tar.gz,
ex. libopenscenegraph-2.7.9-Linux-i386-Release.tar.gz,
libopenthreads-dev-2.7.9-win32-x86-vc80sp1-Debug.tar.gz
* targets (projects in msvs) are generated for each specified
component, a target that packages everything that is installed
(openscenegraph-all) and there's a target for running all other
packaging targets (Package ALL on msvs, package_ALL in unix
makefiles).
* It is possible to set the compiler in ccmake (cmake-gui, whatever you use)
* the top folder in packages is the same for all packages (OpenSceneGraph-x.y)
* the packaging support is limited with cmake-2.6.0 and not as
dynamic. With cmake-2.6.1 and later building the gdal plugin (for
example) will create a package_libopenscenegraph-gdal target. With
cmake-2.6.0 only the ones that are always built (libopenscenegraph,
libopenscenegraph-dev, openscenegraph, libopenthreads,
libopenthreads-dev
* i found a better way to decide whether cpack is available to guard
the BUiLD_OSG_PACKAGES option"
2009-01-12 19:34:03 +08:00
# This is naive and will probably need fixing eventually
IF ( MSVC )
SET ( MOVE_COMMAND "move" )
ELSE ( MSVC )
SET ( MOVE_COMMAND "mv" )
ENDIF ( MSVC )
# Rename the package to get the proper filename <package>-<platform>-<arch>[compiler]-<buildtype>.tar.gz
ADD_CUSTOM_COMMAND ( TARGET ${ PACKAGE_TARGETNAME }
# COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.tar.gz" "${OSG_PACKAGE_FILE_NAME}-$(OutDir).tar.gz"
C O M M A N D " $ { M O V E _ C O M M A N D } " " $ { C P A C K _ P A C K A G E _ F I L E _ N A M E } . t a r . g z " " $ { O S G _ P A C K A G E _ F I L E _ N A M E } . t a r . g z "
)
# Add the exact same custom command to the all package generating target.
# I can't use add_dependencies to do this because it would allow parallell building of packages so am going brute here
ADD_CUSTOM_COMMAND ( TARGET ${ PACKAGE_ALL_TARGETNAME }
C O M M A N D " $ { M O V E _ C O M M A N D } " " $ { C P A C K _ P A C K A G E _ F I L E _ N A M E } . t a r . g z " " $ { O S G _ P A C K A G E _ F I L E _ N A M E } . t a r . g z "
)
ENDMACRO ( GENERATE_PACKAGING_TARGET )
# Create configs and targets for a package including all components
SET ( OSG_CPACK_COMPONENT ALL )
GENERATE_PACKAGING_TARGET ( openscenegraph-all )
# Create configs and targets for each component
FOREACH ( package ${ CPACK_COMPONENTS_ALL } )
SET ( OSG_CPACK_COMPONENT ${ package } )
GENERATE_PACKAGING_TARGET ( ${ package } )
2008-12-12 19:01:09 +08:00
ENDFOREACH ( package ${ CPACK_COMPONENTS_ALL } )