Skip to content
Snippets Groups Projects

Header Relocatability, main branch (2024.06.03.)

All threads resolved!

After discussing about it in the S&C Workshop today, these are updates needed to put the project's public headers into a unique directory using CMAKE_INSTALL_INCLUDEDIR. Many of the libraries had this set up correctly already, but many of them had include hardcoded for the directory that would be picked up by the clients. (Everything was using ${CMAKE_INSTALL_INCLUDEDIR} correctly for the corresponding install(...) commands already.)

The end-goal here is to be able to do this sort of a thing:

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_INCLUDEDIR="include/GeoModel" -S GeoModel -B build

Which would then result in an installed directory layout like:

├── include
│   └── GeoModel
│       ├── GeoGenericFunctions
│       ├── GeoModelDBManager
│       ├── GeoModelHelpers
│       ├── GeoModelIOHelpers
│       ├── GeoModelKernel
│       ├── GeoModelRead
│       ├── GeoModelWrite
│       └── TFPersistification
└── lib
    └── cmake
        ├── GeoModelCore
        └── GeoModelIO

, instead of the default:

├── include
│   ├── GeoGenericFunctions
│   ├── GeoModelDBManager
│   ├── GeoModelHelpers
│   ├── GeoModelIOHelpers
│   ├── GeoModelKernel
│   ├── GeoModelRead
│   ├── GeoModelWrite
│   └── TFPersistification
└── lib
    └── cmake
        ├── GeoModelCore
        └── GeoModelIO

What's more, the generated CMake code (after this MR) also respects this layout. :wink:

# Create imported target GeoModelCore::GeoModelKernel
add_library(GeoModelCore::GeoModelKernel SHARED IMPORTED)

set_target_properties(GeoModelCore::GeoModelKernel PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/GeoModel"
  INTERFACE_LINK_LIBRARIES "Eigen3::Eigen;GeoModelCore::GeoGenericFunctions;dl"
)

(This MR is all about this very last thing.)

Pinging @boudreau, @emoyse, @pagessin.

P.S. Since I use VSCode, I'm also sneaking a convenience update into this MR. :stuck_out_tongue:

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Paul Gessinger
    • Resolved by Vakhtang Tsulaia

      Now that we're all back from the S&C week, it would be good to get back to this. :thinking: Does anyone have an idea of why the CI is failing?

      As far as I can tell, my fork of the repository is public. So I don't know why the job in question fails. :frowning:

  • Joseph Boudreau resolved all threads

    resolved all threads

  • mentioned in merge request !328 (merged)

  • mentioned in merge request !333 (closed)

  • Paul Gessinger mentioned in merge request !344

    mentioned in merge request !344

  • Please register or sign in to reply
    Loading