CamiTK CMake macros used to create package of the CamiTK project (a custom CEP or the CamiTK project itself). More...
Collaboration diagram for packaging:Functions | |
| void | camitk_cep_packaging () |
| CamiTK cep packaging allows you to build a package from a CEP If README and COPYRIGHT files exists at top source dir, then they will be included in the source package. | |
| void | camitk_communityedition_packaging () |
| ==================== Source Tar ball ==================== | |
CamiTK CMake macros used to create package of the CamiTK project (a custom CEP or the CamiTK project itself).
| void camitk_cep_packaging | ( | ) |
CamiTK cep packaging allows you to build a package from a CEP If README and COPYRIGHT files exists at top source dir, then they will be included in the source package.
Usage:
| NAME | (optional) Specify the package name (default is project name) |
| VENDOR | (optional) Specify the vendor name (default is TIMC-IMAG) |
| CONTACT | (optional) Specify the contact name (default is link to CamiTK website) |
| LICENSE | (optional) Specify the license test |
When configuring CMake, do not forget to set the CMAKE_INSTALL_PREFIX correctly (e.g., /usr on Linux) It will always use the CamiTK install directory as install prefix (install where the core is already)
To generate deb package add this to the cmake configuration line: -DCPACK_BINARY_DEB:BOOL=TRUE To generate rpm package add this to the cmake configuration line: -DCPACK_BINARY_RPM:BOOL=TRUE
| void camitk_communityedition_packaging | ( | ) |
==================== Source Tar ball ====================
To make a source tar ball, use the custom target "camitk-ce-package-source"
==================== Windows User Package ====================
To make an installer (setup.exe) for the user package:
On Windows platforms CMake configure command (from the build directory) : cmake -DCMAKE_GENERATOR="Visual Studio 12 Win64" -DPACKAGING_NSIS=TRUE -DCEP_IMAGING=TRUE -DCEP_MODELING=TRUE -DAPPLICATION_CEPGENERATOR=FALSE -DAPPLICATION_TESTACTIONS=FALSE -DAPPLICATION_TESTCOMPONENTS=FALSE -DAPPLICATION_WIZARD=FALSE ../src Launch the camitkcommunityedition.sln visual studio solution file. Build all in Release (do it again if some .h files missing errors occured) Build camitk-package target.
On windows for the NSIS packager, to generate different components that can be opt out at install time, see http://www.itk.org/Wiki/CMake:Component_Install_With_CPack
More generally see http://www.itk.org/Wiki/CMake:CPackConfiguration
==================== Linux User Package ====================
On UNIX platforms cmake -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DCEP_IMAGING:BOOL=TRUE -DCEP_MODELING:BOOL=TRUE -DPACKAGING_NSIS:BOOL=TRUE -DCMAKE_INSTALL_PREFIX=/usr
On debian/ubuntu, you need to have package "dpkg" (to build DEB packages) and package "rpm" (to build RPM packages) installed: apt-get install dpkg rpm
To check the content of a deb package: dpkg –contents package.deb To install the content of a deb in a subdirectory instead of system-wide: dpkg –vextract package.deb subdirectory
There is a bug deb package (cmake 2.8.9 on Debian Wheezy): permission for directories are not rights Here is how to fix it (inspired from https://github.com/paralect/robomongo/blob/master/install/linux/fixup_deb.sh.in ) set PACKAGE_FILENAME="camitk-3.3.0-debian-7.x-wheezy_amd64.deb" cd /tmp mkdir camitk-deb dpkg-deb -x $PACKAGE_FILENAME camitk-deb dpkg-deb –control $PACKAGE_FILENAME camitk-deb/DEBIAN rm $PACKAGE_FILENAME find camitk-deb -type d -print0 |xargs -0 chmod 755 find camitk-deb -name "*.1" -print0 |xargs -0 chmod 0644 find fix_up_deb/usr/bin -name "camitk-*" -print0 |xargs -0 chmod 0755 fakeroot dpkg -b camitk-deb $PACKAGE_FILENAME rm -rf camitk-deb