Skip to content

Conversation

@chenel
Copy link
Collaborator

@chenel chenel commented Mar 18, 2025

Up until now, the only "packaged" solution for dune-plot-style was 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 to cmake when building dune-plot-style) is in CMAKE_PREFIX_PATH (whether naturally or by setting it explicitly), then dune-plot-style is findable by other CMake build projects by simply using FindProject(DUNEPlotStyle). Then any target that wants to use the header can simply target_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.

@chenel chenel marked this pull request as ready for review March 19, 2025 18:47
@chenel chenel requested a review from a team as a code owner March 19, 2025 18:47
Copy link
Contributor

@admlw admlw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks sensible to me!

@chenel chenel merged commit e6cdd08 into main Mar 20, 2025
2 checks passed
@chenel chenel deleted the feature/cmake_build branch March 20, 2025 14:36
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