Skip to content
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

Generate .pc and .cmake files during install. #1

Open
brettviren opened this issue Sep 22, 2016 · 1 comment
Open

Generate .pc and .cmake files during install. #1

brettviren opened this issue Sep 22, 2016 · 1 comment

Comments

@brettviren
Copy link
Member

Eg, like this:

https://groups.google.com/forum/#!topic/waf-users/8uS3ty0z0ik

@drbenmorgan
Copy link

(Just a couple of quick notes from the discussion on the LArSoft list, apologies if these are obvious/known!) For the .pc file, to help in relocatability, the ${pcfiledir} directive/variable can be used to self-locate the .pcfile and derive paths from it, e.g

prefix=${pcfiledir}/../..
incdir=${prefix}/include
...

I'd guess the relative path from the pkg-config install location to install prefix and similar can be derived easily in the waf scripts and turned into expansion variables.

For the .cmake files, and again to help in relocatability, the new imported targets with usage requirements can be used: https://cmake.org/cmake/help/v3.5/manual/cmake-buildsystem.7.html.
These are fully relocatable, make usage easier as required flags like `-I' are added automatically, and handle transitive dependencies (fairly) easily.

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

No branches or pull requests

2 participants