Skip to content

Conversation

@tastytea
Copy link
Contributor

@tastytea tastytea commented Dec 18, 2019

Use find_dependency() to depend on CURL and Threads so CMake users don't have to
do it themselves.


Checklist

Not all of these might apply to your change but the more you are able to check
the easier it will be to get your contribution merged.

  • CI passes
  • Description of proposed change
  • Documentation (README, code doc blocks, etc) is updated
  • Existing issue is referenced if there is one
  • Unit tests for the proposed change

CMake compatibilty

Reasoning

Since curl and threads are not optional, they should be required by
restclient-cppConfig.cmake, in my opinion. It makes the CMakeLists.txt of
users a bit cleaner and shorter and has no downsides, as far as I'm aware.

Before:

find_package(CURL REQUIRED)
find_package(Threads REQUIRED)
find_package(restclient-cpp 0.5 REQUIRED CONFIG)

After:

find_package(restclient-cpp 0.5 REQUIRED CONFIG)

Use find_dependency() to depend on CURL and Threads so CMake users don't have to
do it themselves.
@mrtazz
Copy link
Owner

mrtazz commented Feb 12, 2020

thanks for the patch!

@mrtazz mrtazz merged commit 16cf642 into mrtazz:master Feb 12, 2020
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