| Version 7 (modified by osg, 4 years ago) |
|---|
CPack support in the OpenSceneGraph source tree
The OpenSceneGraph build system can generate packaging targets for you if you have cmake version 2.6.0 or higher. Versions of cmake from 2.6.1 works better in that it can generate packaging targets for the non-standard plugins (e.g. vnc, dae (COLLADA), vrml...). To enable generation of package targets run cmake with -DBUILD_PACKAGES=ON or check to box next to BUILD_PACKAGES in cmake-gui.
The following targets (at least) will be generated
| Package Name | make target | MSVC project | Contents |
| libopenthreads | package_libopenthreads | Package libopenthreads | The OpenThreads? library. On windows using shared binaries it includes the dll |
| libopenthreads-dev | package_libopenthreads-dev | Package libopenthreads-dev | OpenThreads? headers. If building static binaries this package includes the library. On windows and building shared binaries this package contains the link library |
| libopenscenegraph | package_libopenscenegraph | Package libopenscenegraph | The OpenSceneGraph library. |
| libopenscenegraph-dev | package_libopenscenegraph-dev | Package libopenscenegraph-dev | OpenSceneGraph headers. Static libraries. On windows the .lib files for linking with the dlls |
The following packaging targets will be generated depending on certain prereqs
| Package Name | Pre-req | make target | MSVC project | Contents |
| openscenegraph | BUILD_APPLICATIONS=ON | package_openscenegraph | Package openscenegraph | The OSG applications, e.g. osgviewer, osgversino |
| openscenegraph-examples | BUILD_EXAMPLES=ON | package_openscenegraph-examples | Package openscenegraph-examples | The OSG examples, e.g. osgvolume, osganimate, osg2cpp |
| openthreads-doc | BUILD_DOCUMENTATION=ON | package_openthreads-doc | Package openthreads-doc | The OpenThreads? reference documentation |
| openscenegraph-doc | BUILD_DOCUMENTATION=ON | package_openscenegraph-doc | Package openscenegraph-doc | The OpenSceneGraph reference documentation |
If you are building non-standard plugins the following targets might be generated. Generating these targets will happen only with cmake-2.6.1 or higher
| Package Name | make target | MSVC project | Contents | Dependencies |
| libopenscenegraph-iv | package_libopenscenegraph-iv | Package libopenscenegraph-iv | The inventor plugin | Coin |
| libopenscenegraph-dae | package_libopenscenegraph-dae | Package libopenscenegraph-dae | The COLLADA plugin | COLLADA versino-?? |
| libopenscenegraph-dicom | package_libopenscenegraph-dicom | Package libopenscenegraph-dicom | The dicom plugin | ITK or DCMT |
| libopenscenegraph-gdal | package_libopenscenegraph-gdal | Package libopenscenegraph-gdal | The GDAL plugin | GDAL |
| libopenscenegraph-gecko | package_libopenscenegraph-gecko | Package libopenscenegraph-gecko | The Gecko plugin | libxul-1.8.x |
| libopenscenegraph-pdf | package_libopenscenegraph-pdf | Package libopenscenegraph-pdf | The pdf plugin | Cairo, Poppler |
| libopenscenegraph-svg | package_libopenscenegraph-svg | Package libopenscenegraph-svg | The svg plugin | Cairo/SVGR |
| libopenscenegraph-vnc | package_libopenscenegraph-vnc | Package libopenscenegraph-vnc | The VNC plugin | libVNCServer |
| libopenscenegraph-vrml | package_libopenscenegraph-vrml | Package libopenscenegraph-vrml | The VRML plugin | VRML-14.3 |
Platform specifics
On windows the CPack looks for 7-zip (7-zip.org) or Winzip in the %ProgramFiles?% folder. I use only 7-zip and it works great for generating tgz's or zips if you like.
Deb rpm or zip archives
It is always possible to generate archives in other formats using generated ${OSG_BINARY_DIR}/CPackConfig-xxxxx.cmake. You just need to invoke cpack yourself, e.g.
cpack -G ZIP --config <OSG_BUILD_DIR>/CPackConfig-libopenscenegraph.cmake cpack -G RPM --config <OSG_BUILD_DIR>/CPackConfig-openscenegraph-doc.cmake cpack -G STGZ --config <OSG_BUILD_DIR>/CPackConfig-libopenthreads.cmake
Package names
Package names are created on the form
<package>-<osg version>-<platform>-<arch>[-<compiler>]-<build_type>[-static].tar.gz
where package::
is the component, e.g. libopenscenegraph, openscenegraph
osg version::
major, minor and patch verison of your osg source
platform::
win32, win64, Linux etc.
arch::
i386, x86, ia64 etc.
compiler::
If OSG_CPACK_COMPILER is set it will get put here. A default is generated for msvc but anyone can set OSG_CPACK_COMPILER
build_type::
Corresponds to CMAKE_BUILD_TYPE. Debug or Release on unices. On windows might be RelWithDebugInfo? or MinSize? too.
static::
If you are building static libraries the package name ends with static
