Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,928
    • Issues 3,928
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Merge requests
  • !3724

CPack: Make STGZ handle install prefixes better

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed sidju requested to merge sidju/cmake:STGZ-support-install-location into master Aug 23, 2019
  • Overview 12
  • Commits 3
  • Pipelines 6
  • Changes 4

STGZ now uses the "CPACK_STGZ_INCLUDE_SUBDIR" (new feature) setting given by CPACK as a default on wether or not to include subdir.

Some checks have been made so that STGZ packages use CPACK_PACKAGING_INSTALL_PREFIX if defined, as documentation suggests it should at https://cmake.org/cmake/help/latest/variable/CPACK_PACKAGING_INSTALL_PREFIX.html

(It would probably be advantageous to mention CPACK_PACKAGING_INSTALL_PREFIX in the cpack documentation at https://cmake.org/cmake/help/latest/module/CPack.html, but I don't know where in the repo your documentation resides.)

The setting is overridden by any arguments given upon execution, enabling installation in any location chosen by user if need be.

A potential problem is that the configure_file mechanic doesn't support flow control, so the resulting script has a if clause that always returns the same.

In combination these changes allow the creation of a package that installs in the location the packager intended by default.

Topic-rename: cpack-STGZ-support-install-location

Edited Aug 29, 2019 by Brad King
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: STGZ-support-install-location