Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • O Open VDS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 28
    • Issues 28
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe SoftwareOpen Subsurface Data Universe Software
  • Platform
  • Domain Data Management Services
  • Seismic
  • Open VDS
  • Merge requests
  • !748

Fix order in which installation prefix is set

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Alexander Jaust requested to merge fix/alexander.jaust/default-install-prefix-overwrite-order into master Nov 22, 2022
  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 2

The installation prefix is overwritten in case the user does not specify and installation prefix themselves. This merge request makes sure that the prefix is overwritten before the GNUInstallDirs macro is included. This avoids problems with some CMake variable containing the default values of the GNUInstallDirs although the CMAKE_PREFIX_PATH has been overwritten. This was a problem, e.g., for the pkg-config file generation. Namely, the CMake variables CMAKE_INSTALL_FULL_LIBDIR and CMAKE_INSTALL_FULL_INCLUDEDIR would point to /usr/local/lib and /usr/local/include which leads to an invalid pkg-config file since OpenVDS would be installed to ${PROJECT_SOURCE_DIR}/Dist/OpenVDS instead.

I decided to move the code overwriting the default prefix into the CMakeLists.txt in the root directory instead of moving the include(GNUINstallDirs) below add_subdirectory(src). To me it felt more naturally to have code changing the CMake configuration in the main CMakeLists.txt as this setting is not specific to the actual source code. Let me know if you disagree with that. 😄

Edited Nov 22, 2022 by Alexander Jaust
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/alexander.jaust/default-install-prefix-overwrite-order