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
4
votes
4 answers

rpmbuild check-rpath reports error that path is not absolute, incorrectly

I've been building RPMs using CMake & CPack 3.13.4 on OEL7 for several months without issue. My CMake configuration contained these lines: SET(CMAKE_SKIP_BUILD_RPATH FALSE) SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) SET(CMAKE_INSTALL_RPATH…
Obiphil
  • 361
  • 1
  • 6
  • 17
4
votes
0 answers

CPack without a CMake project

I'm trying to create a package using CPack but struggling to find examples or documentation that helps me for my use case where I didn't build the code using a cmake project. I have a GO project that has produced a binary that I want installed on a…
incubus
  • 681
  • 1
  • 5
  • 21
4
votes
0 answers

CPack WIX post-flight script and installing files outside the install tree

I'm trying to use the CPack WIX generator to install a service application. How can I accomplish following tasks? Install a file in %ALLUSERSPROFILE%\foo\bar.conf and make it read-writeable for administrators. Run an installed program after…
Pat
  • 1,726
  • 11
  • 18
4
votes
2 answers

cpack component install does not work

I want the cpack to take only certain components. But he takes both run and deb components. I looked at a lot of sources. including this cpack component level install . but I did not understand what I was doing wrong. Tell me please, what did I do…
4
votes
1 answer

How I can add a changelog in deb with CMAKE?

I am building a debian package with CMAKE and CPACK. Everything is smooth with the build except that I can't find how to add a changelog file in the deb package. Is there any way to do it?
Jibrilat
  • 347
  • 1
  • 3
  • 14
4
votes
0 answers

cmake/cpack doesn't recognize inter-component dependencies

I am trying to convince cmake/cpack to build a shared library package (component lib) and a development package (component dev). The lib component should only contain the shared library, and should have no dependencies. The dev component should only…
spierepf
  • 2,774
  • 2
  • 30
  • 52
4
votes
0 answers

Packaging directory with cpack for rpm

I am trying to create a rpm package with directory with lot of files using cmake http://www.rpm.org/max-rpm/s1-rpm-inside-files-list.html To make this situation a bit easier, if the %files list contains a path to a directory, RPM will…
trax
  • 739
  • 8
  • 21
4
votes
1 answer

CMake/CPack: How to avoid top-level directory in zip files

I'm using cpack to create my zip file of my binaries. Everything works fine, but one thing is ugly. CPack always generate a top-level directory (with the name of the project and some other variables). Does anybody know how i can tell cpack to get…
Michael Aigner
  • 4,820
  • 4
  • 21
  • 33
4
votes
1 answer

Create package for just one component with CMake and CPack

I have a project for a client/server application and I have defined one installation component for each. I use set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) in order to get two different package files when I run make package. But I don't get different…
Antonio Pérez
  • 6,702
  • 4
  • 36
  • 61
4
votes
1 answer

How can I package a symlink with cpack?

I've seen many linux applications packaged with their binaries in some path like /opt/mypkg/myexecutable and a symlink to it in /usr/bin. I've seen these symlinks in the packaged files. I want to do the same while packaging my software with cpack,…
unR
  • 1,298
  • 14
  • 21
4
votes
2 answers

Adding files to ARCHIVE packages only in CPack

Is it possible to add some files only to the ARCHIVE generators with CMake/CPack? Apparently components do that, but I can't figure how to say "only add component X to generator Y". I did something like this: INSTALL(FILES somefile DESTINATION "."…
brunobg
  • 786
  • 6
  • 27
4
votes
1 answer

CPack: How to perform multiple CPACK_NSIS_EXTRA_INSTALL_COMMANDS?

I'm writing an installer with CMake 2.8.11.2, CPack and NSIS. I came to the point where I need to call included sub-installers like MSVCR. Here is what my CMakeLists.txt looks like: set(CPACK_GENERATOR NSIS) list ( APPEND…
Manuel Barbe
  • 2,104
  • 16
  • 21
4
votes
1 answer

CPack: How to use exporting to create library package? Missing *Targets-noconfig.cmake file

Update It looks like it's Windows cpack version bug - under Linux (Ubuntu) the cpack command the missing file. I'll do more research and post results when I have more time. Note: I completely changed this question because I was able to simplify it…
user1476710
4
votes
2 answers

Error "ABSOLUTE path INSTALL DESTINATION forbidden (by caller)" when generate installer for Windows by using CPack NSIS

I´m trying to run packet generator within a VS project, it crashes while compiling because of the use of absolute path on installation from Targets and Files. ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ... I checked twice and all…
mattobob
  • 833
  • 4
  • 15
  • 37
4
votes
0 answers

CMake / CPack: location of third-party libraries in MacOS

We're working on a multi-platform C++ GUI project. We have dependencies on some third-party libraries (e.g. boost, fftw, etc.) and these also get delivered and installed, so there's no need for our users to download extra components. Right now, for…
chahuistle
  • 2,627
  • 22
  • 30