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

Added install target and cmake package exports #83

Merged
merged 1 commit into from
Jan 26, 2019

Conversation

gracicot
Copy link
Contributor

This patch add the necessary cmake commands to export the package and config files.

This make inja easily consumable using plain cmake.

mkdir build && cd build
cmake ..

Then in consumer projects:

find_package(inja REQUIRED)
target_link_libraries(my_target PUBLIC pantor::inja)

I added inja targets to the pantor namespace. Tell me if you prefer the namespace to simply be inja.

Also, I added an option in the cmake to use the nlohmann json library found on the system. Unless specified, it will simply use the provided header.

The patch also make inja available through installation:

# inside inja/build
cmake ..
make install # installs the library in the installation prefix

@pantor
Copy link
Owner

pantor commented Jan 26, 2019

Perfect, that’s awesome! Great to see contributions like this.

@pantor pantor merged commit 11d07f5 into pantor:master Jan 26, 2019
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.

2 participants