Skip to content

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