introduce exportable CMake install #51
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Up until now, the only "packaged" solution for
dune-plot-stylewas via the UPS package interface. This works okay for users who have that available. However, anyone who wishes to use it in a more "standalone" way has to do a lot of the linkage themselves.This PR introduces a standalone CMake build that, when installed, "exports" its targets. Assuming its installation location (
-DCMAKE_INSTALL_PREFIX=<wherever>passed tocmakewhen buildingdune-plot-style) is inCMAKE_PREFIX_PATH(whether naturally or by setting it explicitly), thendune-plot-styleis findable by other CMake build projects by simply usingFindProject(DUNEPlotStyle). Then any target that wants to use the header can simplytarget_link_libraries(<target_name> DUNEPlotStyle)to pull in the dependencies.This supplements the already-existing Python-based installation. Probably these should be unified (maybe using something like this?), but that will wait until somebody who has interest in so doing appears...
This PR also includes updates to the script that makes the UPS package, such that it makes the requisite CMake files as part of the package assembly, and installs them in the right place. That way anybody interested who has UPS access can also just set up the package and use the CMake interface right away.