-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CMake configuration to make Physsim usable as a library #2
Conversation
Define targets properly and export and install them such, that they are easily usable with find_package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine to me
When building against ilcsoft v02-02-03, |
- Remove duplicated headers - Fix include paths - Merge LinkDef.h files into one and remove individual ones - Explicitly state library source files - Use CMake macro provided by root
After a bit of fiddling and some more cleanup, this now works with key4hep and iLCSoft releases (at least with recent ones), and the CI workflows now also build the example processors. In the course of the cleanup I have removed the duplicated headers in the |
Since all the testing has been done successfully, I think we can merge this and fix any upcoming issues in a separate pull request to not make this too cluttered. |
cmake_policy(SET CMP0008 NEW) | ||
#--- Define basic build settings ----------------------------------------------- | ||
# Provides install directory variables as defined for GNU software | ||
include(GNUInstallDirs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the libraries now go to lib64, which breaks the check in ilcsoft-install
(And the assignment of the library to MARLIN_DLL, which happens because of how physsim is done in ilcsoft install https://github.com/iLCSoft/iLCInstall/blob/b32418db68960110ade0270a7ce37fbe32241983/releases/HEAD/release-ilcsoft.cfg#L167-L168 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is true. I have made a PR to iLCInstall to accomodate for the lib[64]
changes. MARLIN_DLL
should not really matter for Physsim, because it does not build processors. Those need to be explicitly built from the examples directory.
BEGINRELEASENOTES
find_package(Physsim)
src
and use the ROOT CMake macro to generate dictionaries and build the library.ENDRELEASENOTES