Questions tagged [cpack]

CPack is a packing and install tool for CMake generated projects

CPack is develop by Kitware to generated a package (install file) from your CMake generated projects. It is, like CMake, multi platfom aware and used different generators for different platforms, e.g. NSIS for windows plattforms.

It is been shipped with your CMake installation.

The documents can be found here.

330 questions
69
votes
3 answers

How to install your custom CMake-Find module

I configure and package my library using CMake and CPack. I have written my own find-module: FindMyLib.cmake. How do I tell CMake/CPack to add this file to the CMake module directory, so that future developers can simply specify FIND_PACKAGE(MyLib)…
goocreations
  • 2,938
  • 8
  • 37
  • 59
29
votes
6 answers

zip files using CMake?

tl;dr version: Is it possible with CMake (>= 2.8) to generate zip files from some files and put the packed zip file in a specific location? longer version: I have a CMakeLists.txt that builds my project into a .exe file, and this exe file will read…
blubberbernd
  • 3,641
  • 8
  • 35
  • 46
28
votes
1 answer

How to create an installer with CMake + CPack + NSIS on Windows?

I'd like to create a cross-platform installer for a C++ based system I am building. I use CMake to build everything, and it would be great if I could use CPack to make the installer. I already have CPack working on OSX, but I cannot get it to work…
sklum
  • 537
  • 1
  • 6
  • 13
24
votes
2 answers

CMake-CPack Package Installation Path Nightmare

I've been frustrated by the the CMake-CPack for almost one week. The bad thing is the CMake-CPack online documentation does not document this part well. After googling, I found this variables to use: CPACK_PACKAGING_PREFIX # NOT…
Peter Lee
  • 12,931
  • 11
  • 73
  • 100
15
votes
2 answers

How to build debian package with CPack to execute setup.py?

Until now, my project had only .cpp files that were compiled into different binaries and I managed to configure CPack to build a proper debian package without any problems. Recently I wrote a couple of python applications and added them to the…
karlphillip
  • 92,053
  • 36
  • 243
  • 426
13
votes
2 answers

"make dist" equivalent in CMake

According to FAQ, CMake doesn't create a make dist target and source package can be created using CPack. But CPack just makes a tarball of the source directory with all files that don't match patterns in CPACK_SOURCE_IGNORE_FILES. On the other…
marcin
  • 3,351
  • 1
  • 29
  • 33
13
votes
2 answers

How do you make it so that cpack doesn't add required libraries to an RPM?

I'm trying to convert our build system at work over to cmake and have run into an interesting problem with the RPMs that it generates (via cpack): It automatically adds all of the dependencies that it thinks your RPM has to its list of required…
Jonathan M Davis
  • 37,181
  • 17
  • 72
  • 102
12
votes
1 answer

CMake/CPack: Preferred package generators for different platforms

I want to distribute executables and libraries of a C/C++ project on Linux, OSX and Windows. What are the preferred CPack generators, i.e. which are likely to be available for most users? On Windows there only seems to be NSIS, but on Linux and OSX…
mattmilten
  • 6,242
  • 3
  • 35
  • 65
12
votes
3 answers

CPack: Exclude INSTALL commands from subdirectory (googletest directory)

I'm using CMake for a project and googletest for my test cases. Looking around the internet, it seems to be common practise to just copy the googletest source into a subfolder of your repository and include it with "add_subdirectory(googletest)". I…
Heinzi
  • 5,793
  • 4
  • 40
  • 69
11
votes
1 answer

How to idiomatically package dependencies for a QT application using CPack?

I have a simple QT project. I'm developing on Linux. But it's meant to be deployed to Linux, Mac and Windows ultimately. I'm attempting to package it for distribution. I'm running into problems locating the dependencies and packaging them up…
101010
  • 14,866
  • 30
  • 95
  • 172
11
votes
2 answers

Can't configure background image for DMG installation using CMake

I am working with CMake 2.8.10.2 on Mac OS X 10.7.5. I've configured CMake to build a simple application with Xcode that creates an empty window. I then tried to configure CMake to build a DMG installation of the program specifying a background…
Tron Thomas
  • 871
  • 7
  • 20
11
votes
2 answers

cpack cannot find libraries, target doesn't exist in this directory

EDIT =================== The apr-1 is the apache portable runtime, which I downloaded and compiled myself to create the shared library (so its not made by cmake). I need to link against this library after I run CPack on the target system. My…
ant2009
  • 27,094
  • 154
  • 411
  • 609
10
votes
2 answers

How to get the list of files that will be installed when installing a CMake component

Is there any way to know programmatically (in CMake) what files will be installed if a COMPONENT is installed (something like a get_property of component)? Currently, I am installing a COMPONENT to a temporary location for packaging (not using CPack…
k0n3ru
  • 683
  • 1
  • 8
  • 25
9
votes
1 answer

How to add files to debian package with CPack?

I am using Cmake with Cpack to create debian package. I would like to use Cpack to generate a package that will install that files to specific location. (ex. /usr/lib /usr/include/aaa) each library and header files are specified in a install…
pius lee
  • 1,164
  • 1
  • 12
  • 28
9
votes
1 answer

cmake/cpack component debuginfo rpm package doesn't appear

CentOS6.9 / cmake 3.6.1 On my project I'm trying to create several components, than build runtime, devel and debuginfo packages for them, but I was unable to produce more than one rpm for each component. I created small project to show the…
J. Ode
  • 91
  • 2
1
2 3
21 22