Closed NicoG60 closed 3 years ago
@jayeshbadwaik since you added the install support.. any comments?
The required use case is already supported by using add_subdirectory
with a EXCLUDE_FROM_ALL
option as shown in this proof-of-concept project. Therefore, I do not see any need for the PR.
@jayeshbadwaik Sorry I completely forgot about that feature! In this case yeah, my PR is useless.
Thanks @jayeshbadwaik for pointing that out. And @NicoG60 , not totally useless. I've added an issue (https://github.com/bfgroup/Lyra/issues/45) to improve the doc comment in the cmakelists.txt.
I've added a simple cmake trick to detect if Lyra is "built" and installed directly or if it is used via the
add_subdirectory
directive.This allow the users of the latter not being polluted by Lyra install targets. It is also compatible with existing procedure as it automatically turns the install targets ON when used directly.
Finally even when using it as a subdir, you can override that behaviour and still install Lyra by doing the following:
Hope it is useful for others :)