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

CMake top level project with multiple child projects creating packages

I have multiple CMake projects that each create a debian package. I have been trying to create a top level project that calls add_subdirectory() on each 'child' project. All child projects build but 'make project' creates a project with the last…
DKLind
  • 71
  • 6
7
votes
2 answers

Generate two different package using CPack in cmake : Linux

I want to create two different package for my project. DCM (Includes all the modules except RCM specific module ) RCM (Specific Module.) 1. DCM : src/CMakeList.txt cmake_minimum_required (VERSION 2.8) add_subdirectory(ecs) # Include all…
AB Bolim
  • 1,997
  • 2
  • 23
  • 47
7
votes
1 answer

how get cpack to generate correct start menu shortcuts

I want to create an installer for some programs on windows with cmake and cpack. I want to be able to select which programs to install and the selected programs shall show up in the start menu as shortcuts. Here is a simple try. Have done one…
lgwest
  • 1,347
  • 5
  • 16
  • 26
7
votes
3 answers

CPack DEB generator: control-file-has-bad-permissions mdsums 0644 != 0644

I am developing small console application and I was trying to create Ubuntu package using CPack. Ubuntu version is 13.04 and my main CPack file is below. Package is created correctly, but while trying to install it using graphic interface (basically…
lisu
  • 2,213
  • 14
  • 22
6
votes
1 answer

Is there a tool for meson similar/equivalent to CPack for CMake?

I have recently started learning meson and I am testing switching to it (from CMake) in one of my projects. The problem is that I usually use cpack to build the project's packages/installers, and after scouring the meson docs for something similar…
Object object
  • 1,939
  • 10
  • 19
6
votes
2 answers

CPack WIX install a file outside the install tree

I'm using the CPack WIX generator to create an installer. The installer needs to install a file in a %ALLUSERSPROFILE%\foo\ folder on the target system. I can't find a way to install files outside of the install tree (C:\Program Files\foo...) How…
Pat
  • 1,726
  • 11
  • 18
6
votes
2 answers

Cmake/Cpack Debian packaging - producing correct package name

I'm attempting to build a properly named Debian package using Cpack. I have the following in my CMakeLists.txt: set(CPACK_PACKAGE_NAME "something") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") set(CPACK_PACKAGE_ARCHITECTURE…
Craig S. Anderson
  • 6,966
  • 4
  • 33
  • 46
6
votes
1 answer

add_subdirectory() without installing anything

With CMake I use add_subdirectory(gtest) to build gtest for testing my project. I also use CPack to make an installer. The problem is the gtest repo (which is a git submodule) runs install() on some files so they end up in my installer! Obviously I…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
6
votes
4 answers

How to pass variable to cpack?

I have a cmake project which one of the install targets is a collection of files. This files change depending on the configuration (Release, Debug...). I would like to be able to install the files like so: install(DIRECTORY $
Mac
  • 3,397
  • 3
  • 33
  • 58
6
votes
3 answers

Generating an installer using CMake + CPack + Wix

Summary: How to generate Wix installer with CMake/CPack? Details: I am trying to generate an installer out from a project that uses Wix, but apparently, cmake/cpack insist to use nsis, for example, from the repo…
6
votes
2 answers

How to set an Icon in NSIS install (CMake)

The documentation for CPACK_PACKAGE_ICON is very limited on cmake wiki page. The following is not working for me (as per): set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/images/MyIcon.bmp") include(CPack) It leads to: File:…
malat
  • 12,152
  • 13
  • 89
  • 158
6
votes
1 answer

CPack packing multiple package

How do I pack multiple packages using cpack. multiple package as follows: A.tar.gz ---bin/hello ---lib/libhello.a ---B.tar.gz ---bin/demo ---lib/libdemo.a B.tar.gz is included in A.tar.gz
mashiaoo
  • 61
  • 2
5
votes
1 answer

How do I use CPACK_INSTALL_COMMANDS?

I'm creating a Linux tgz self-extracting installer using CPack and I'd like the installer to run a script or sequence of commands after all files have been installed. CPack documentation contains the following guidance: CPACK_INSTALL_COMMANDS Extra…
Dave Taflin
  • 474
  • 5
  • 9
5
votes
1 answer

CPack NuGet Packages

Context I have a Managed C++/CLR library which is built using CMake 3.17, and packaged into a NuGet package using CPack. The resulting nupkg file cannot be imported into a C# project, as the Package Manager issues the following error: "[snip] the…
blockchaindev
  • 3,134
  • 3
  • 22
  • 30
5
votes
0 answers

How do I include a particular version of the C++ library in a Mac OS bundle made with CMake/CPack?

I have created an application that is written in C++17 and compiled on a Mac with the latest compiler and Catalina version of MacOS. I am using CMake and CPack to create a bundle and package it into a .dmg. When I take the resulting file on another…
1 2
3
21 22