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

support cmake package config file : find_package support + auto-install #123

Conversation

daminetreg
Copy link

Dear @nlohmann,

I wish to submit you these changes which adds the possibility for dependent programs of your library to use it easily via cmake find_package, and therefore auto-download+install via hunter_add_package ( i.e. see example cmake )..

HunterGate(
    URL "https://github.com/ruslo/hunter/archive/vUPCOMING.tar.gz"
    SHA1 "53b198e364dc7bc8360fc545f798563229bd7e20"
)

project(dowload-nlohmann-json)

hunter_add_package(nlohmann-json)
find_package(nlohmann-json)

add_executable(main main.cpp)

target_link_libraries(main
  nlohmann-json::nlohmann-json)

For the moment this is not in Hunter ( i.e. See PR #239 ), but even if it isn't accepted in Hunter, it is useful for code depending on your library, as the changes aren't Hunter specific, they allow the standard cmake find_package mechanism to be used to find your library.

Thank you very much for your awesome library to handle json. I like it. 😄
Cheers,

@daminetreg
Copy link
Author

Is there any chances that this get merged ? 😄

@nlohmann
Copy link
Owner

nlohmann commented Oct 1, 2015

Hi Damien,

I'll check on the weekend.

Cheers,
Niels

Von meinem iPhone gesendet

Am 01.10.2015 um 15:21 schrieb Damien Buhl [email protected]:

Is there any chances that this get merged ?


Reply to this email directly or view it on GitHub.

@daminetreg
Copy link
Author

Is there anything I can do to help this get merged ?

@nlohmann
Copy link
Owner

Sorry for not answering... I'm on holiday right now. I'll check when I come back.

@daminetreg
Copy link
Author

No problem 😄 I just wanted to notify that I can change anything/everything if you want/need it. I saw there is a test run error on AppVeyor but I cannot explain it. Is it because I need to link to a different libc++ or so ?

@nlohmann
Copy link
Owner

Please update the PR so the tests on AppVeyor succeed.

@nlohmann nlohmann closed this Dec 20, 2015
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