= Packaging OpenSceneGraph = [[TracNav(TracNav/SupportTOC)]] == About CPack == Quote from the cmake website CPack is a powerful, easy to use, cross-platform software packaging tool distributed with CMake since version 2.4.2. It uses the generators concept from CMake, to abstract package generation on specific platforms, and it can be used with or without CMake. See also [wiki:Build/CMake CMake] and http://www.cmake.org/Wiki/CMake = CPack support in the OpenSceneGraph source tree = Using either a simple configuration file or the CMake module, a complex project can be packaged into an installer. 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. Targets are named package_ (e.g. package_libopenscenegraph) on all platforms except Windows with MSVS, where projects are named "Package " (e.g. Package libopenscenegraph) Targets for the following packages will (at least) be generated: ||'''Package Name'''||'''Contents'''|| ||libopenthreads||The !OpenThreads library. On windows building shared binaries it contains the dll|| ||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||The OpenSceneGraph libraries. On windows building shared binaries it contains the core dll's|| ||libopenscenegraph-dev||OpenSceneGraph headers. Static libraries. On windows the .lib files for linking with the dlls|| Targets for the following packages will be generated depending on certain CMake configurations variables ||'''Package Name'''||'''Pre-requisite'''||'''Contents'''|| ||openscenegraph||BUILD_APPLICATIONS=ON||The OSG applications, e.g. osgviewer, osgversion|| ||openscenegraph-examples||BUILD_EXAMPLES=ON||The OSG examples, e.g. osgvolume, osganimate, osg2cpp|| ||openthreads-doc||BUILD_DOCUMENTATION=ON||The !OpenThreads reference documentation|| ||openscenegraph-doc||BUILD_DOCUMENTATION=ON||The OpenSceneGraph reference documentation|| If you are building non-standard plugins, targets for the following packages may be generated. Generating these targets will happen only with cmake-2.6.1 or higher ||'''Package Name'''||'''Contents'''||'''Dependencies'''|| ||libopenscenegraph-iv||The inventor plugin||Coin|| ||libopenscenegraph-dae||The COLLADA plugin||COLLADA version-??|| ||libopenscenegraph-dicom||The dicom plugin||ITK or DCMT|| ||libopenscenegraph-gdal||The GDAL plugin||GDAL|| ||libopenscenegraph-gecko||The Gecko plugin||libxul-1.8.x|| ||libopenscenegraph-pdf||The pdf plugin||Cairo, Poppler|| ||libopenscenegraph-svg||The svg plugin||Cairo/SVGR|| ||libopenscenegraph-vnc||The VNC plugin||libVNCServer|| ||libopenscenegraph-vrml||The VRML plugin||VRML-14.3|| == Platform specifics == * On Windows CPack looks for [http://7-zip.org 7-zip] or Winzip in the %ProgramFiles% folder. I use only 7-zip and it works great for generating tgz's or zips if you like. * On windows the cmake scripts tries to determine what compiler you have. Especially it tries to distinguish between vc80 and vc80sp1 since vc80 (msvs 2005) is known to generate "false" error reports on osg-users == Package names == Package names are created on the form: {{{ ---[-]-[-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 !RelWithDebInfo or !MinSizeRel too. static:: If you are building static libraries the package name ends with static = Deb, rpm, Stgz and 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 /CPackConfig-libopenscenegraph.cmake }}} ...to archive the runtine libraries in a zip file {{{ cpack -G RPM --config /CPackConfig-openscenegraph-doc.cmake }}} ...to archive the osg reference docs in an rpm {{{ cpack -G STGZ --config /CPackConfig-libopenthreads.cmake }}} ...to archive the openthreads runtime libraries as a selfextracting .sh script (not very interesting perhaps but it's possible ;-) == TODO == * Add dependency package_openscenegraph-doc to doc_openscenegraph. * Add support for generationg debian and rpm archives