Skip to content

Export targets and make sure they can be used by other projects#177

Merged
tmadlener merged 6 commits into
iLCSoft:masterfrom
jmcarcell:cmake
Nov 14, 2023
Merged

Export targets and make sure they can be used by other projects#177
tmadlener merged 6 commits into
iLCSoft:masterfrom
jmcarcell:cmake

Conversation

@jmcarcell

Copy link
Copy Markdown
Contributor

BEGINRELEASENOTES

  • Export targets and make sure they can be used by other CMake projects

ENDRELEASENOTES

This allows other programs to use the targets without having to rely on some variables that are set like LCIO_LIBRARIES and so on but it's backwards compatible (a clean up would be nice...). This will help with key4hep/k4geo#290 and iLCSoft/LCCD#7 that will have to be adapted based in this PR.

Comment thread cmake/LCIOConfig.cmake.in Outdated
Comment thread cmake/LCIOConfig.cmake.in Outdated
Comment thread sio/CMakeLists.txt Outdated
jmcarcell and others added 3 commits September 25, 2023 08:43
Co-authored-by: Andre Sailer <andre.philippe.sailer@cern.ch>
Co-authored-by: Andre Sailer <andre.philippe.sailer@cern.ch>
@jmcarcell

Copy link
Copy Markdown
Contributor Author

I made a few changes not to modify INSTALL_SHARED_LIBRARY since I realised after that this is used in several repos and added a SIOTargets file in case it's builtin so that it installs it like it does when using standalone SIO. I think this should be ready now and not interfere with other packages.

@jmcarcell

Copy link
Copy Markdown
Contributor Author

Any comments about this @andresailer @tmadlener ? It's less changes than #140 that has been open since 2021 and probably will require more work

@tmadlener tmadlener left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this looks good. Just for my understanding: Effectively this PR makes the builtin SIO install an SIOTargets.cmake, which then makes it possible for LCIO to simply find it via find_package? Resp. it makes packages that depend on SIO (but maybe not LCIO) able to find SIO, even if it is builtin?

Comment thread CMakeLists.txt
Comment thread cmake/LCIOConfig.cmake.in
Comment thread src/cpp/CMakeLists.txt Outdated
jmcarcell and others added 2 commits November 13, 2023 14:35
Co-authored-by: Andre Sailer <andre.philippe.sailer@cern.ch>
@andresailer

Copy link
Copy Markdown
Contributor

When changing key4hep/k4geo#298 to use LCIO::LCIO and building on top of this PR everything looks nice.

@tmadlener tmadlener left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also works in my local build of the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants