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

cmake install option #44

Closed
wants to merge 1 commit into from
Closed

cmake install option #44

wants to merge 1 commit into from

Conversation

NicoG60
Copy link

@NicoG60 NicoG60 commented Jan 19, 2021

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:

set(LYRA_INSTALL ON CACHE BOOL "please install lyra anyway" FORCE)
add_subdirectory(path/to/Lyra)

Hope it is useful for others :)

@grafikrobot
Copy link
Member

@jayeshbadwaik since you added the install support.. any comments?

@jayeshbadwaik
Copy link

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.

@NicoG60
Copy link
Author

NicoG60 commented Jan 19, 2021

@jayeshbadwaik Sorry I completely forgot about that feature! In this case yeah, my PR is useless.

@grafikrobot
Copy link
Member

Thanks @jayeshbadwaik for pointing that out. And @NicoG60 , not totally useless. I've added an issue (#45) to improve the doc comment in the cmakelists.txt.

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