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
0
votes
1 answer

How to generate nuget package with specific file organization using cpack/cmake?

I generate two nuget package with cpack and cmake. My problem is to organize files in my package. I would like to put some files in specific folder. Actually i have in my first package: /_rels /package toto.nuspec toto.dll But i want to have…
Pierre
  • 1
0
votes
1 answer

How to use CPack to pack several cmake build results?

As I have to build both static and shared library for x86 and arm platform. So with the same CMakeLists.txt, I have to run it four times with different configuration. I want to use CPack to pack those libraries to one tar file. However, it seems…
0
votes
1 answer

CPack: Package dependencies and Red Hat / SuSE naming schemes

When using CMake / CPack to build packages, there are CPACK_DEBIAN_PACKAGE_DEPENDS and CPACK_RPM_PACKAGE_REQUIRES to hold a list of packages the resulting .deb / .rpm should depend on. The distinction is helpful, as package naming shemes differ…
DevSolar
  • 67,862
  • 21
  • 134
  • 209
0
votes
1 answer

cpack never finishes, at 100% CPU (infinite loop in path algorithm)

I am running cpack for the first time on a smallish project, containing 2 components -- 3 compiled executables, producing debian package. The packaging does not finish (maximum time I left it running was 30 minutes), it stays at 100% CPU though does…
eudoxos
  • 18,545
  • 10
  • 61
  • 110
0
votes
0 answers

How to define a dependency to setup the package before running find_package

That's unusual for a basic CMake, but might be useful for large projects of multiple individual components. Say someone used CPack to create a binary blob accompanied by proper Find*.cmake rules. Now we want to automate expansion of this archive…
Dmitry Mikushin
  • 1,478
  • 15
  • 16
0
votes
1 answer

CPACK .deb installer backup previous installed version

Is there a way to backup the previous installed version of a .deb package generated by cpack? I have a project that i need to deploy manually on multiple equipments in a live production site. To minimize error and time spent deploying, i would like…
0
votes
1 answer

SET(CPACK_COMPONENTS_ALL ...) with ExternalProject Installing Additional Components

I use the ExtrenalProject cmake module to add 3rd party or internal dependencies to my build. I then use the CPack module with components to install only components from the current code base in the following manner. set(CPACK_COMPONENTS_ALL …
Matthew Hoggan
  • 7,402
  • 16
  • 75
  • 140
0
votes
1 answer

Is it possible to read the value of CMAKE_INSTALL_PREFIX variable in postinst?

Just wanted to ask if it is possible to read the value of CMAKE_INSTALL_PREFIX variable in postinst script? The goal is to have postinst script to read a file in ${CMAKE_INSTALL_PREFIX}/share/myapp folder and, based on the content of the file read,…
Y2i
  • 3,748
  • 2
  • 28
  • 32
0
votes
1 answer

CPack RPM puts library both in "provides" and "requires" lists

My product foo is composed of a library: libfoo.so and an executable: foo, which depends on libfoo.so and on a third-party libbar.so. I use CPack to get a RPM of foo which contains lib/libfoo.so and bin/foo. But in the end I can't install the…
mouviciel
  • 66,855
  • 13
  • 106
  • 140
0
votes
1 answer

CMake check '/etc/hosts' for RPM installation

I'm trying to write a simple execute_process command for my CMakeLists.txt to check for the presence of a certain piece of text in the hosts file when the RPM is being installed, and if it isn't there, append it to the hosts file. However, when…
Darin Beaudreau
  • 375
  • 7
  • 30
0
votes
1 answer

Packing a system daemon on Mac with CPack

I am trying to create a system wide service on Mac using CMake for build and CPack for generate a package. The repository is quite big, so I have created a smaller version to test it. It turns out that I don't know how to pack something that have an…
melanholly
  • 762
  • 1
  • 9
  • 20
0
votes
1 answer

CPack Subprojects and Public Header

I have a question about CPack. I have a project test_lib_1 that depends on 2 other project test_lib_2 and test_lib_3. Both test_lib_2 and 3 define their own CPACK rules, defining PUBLIC_HEADER to be packed. test_lib_1 has the same rule, packaging…
PaoloO
  • 1
0
votes
2 answers

How to with CPack generate the WIX package?

I used cmake 3.12.0. There are exists one cmake project that creates one console application. I add the ability of package generation to that cmake project: # ... above cmake code for one console application creation # below code that I add: #…
AeroSun
  • 2,401
  • 2
  • 23
  • 46
0
votes
1 answer

CMake package (Cpack) - automatically adding dependencies

I am using the install command in cmake to install a target, and while the target it is indeed copied, none of its dependencies are (I am talking about the build-time dependencies, like projects added with ExternalProject_Add). How do I…
tohava
  • 5,344
  • 1
  • 25
  • 47
0
votes
2 answers

Cmake seems not to use the Python interpreter it confirms it uses

I have the following CMakeLists.txt file, which is instructed to use Python 3.4 cmake_minimum_required(VERSION 3.2 FATAL_ERROR) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cmake/") project(aConfigd VERSION 1.0) string(TOLOWER…
boardrider
  • 5,882
  • 7
  • 49
  • 86