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

[Hunterize] Add cmake install support and a config file #1

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

bkotzz
Copy link

@bkotzz bkotzz commented Mar 26, 2019

Reopened from axiomatic-systems#380. Will use the hunter fork while waiting for the upstream review. PTAL @ruslo

This change enhances the CMake script to support installing the package so that other projects can use it.

  • This adds support for a config file. This is the conventional way for a cmake project to support use by other projects via cmake find_package. See https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/How-to-create-a-ProjectConfig.cmake-file for more information.
  • This adds support for an install target. You can then run make install, and it will install the static library and headers for other projects to consume, the generated config files, and the binaries for all of the apps in the project. The install locations are conventional (/usr/local/{include|bin|lib}) but can be overriden by the consuming package, or a package manager.

I've tested the basic ability to build against the include directory and link against the static library, and be able to use the library from another project.

@ruslo ruslo changed the base branch from hunter-1.5.1-628 to hunter-1.5.1-628-e6ee435 March 26, 2019 14:24
@ruslo ruslo merged commit fa246dc into hunter-packages:hunter-1.5.1-628-e6ee435 Mar 26, 2019
@ruslo
Copy link

ruslo commented Mar 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants