influxdb-cpp-rest icon indicating copy to clipboard operation
influxdb-cpp-rest copied to clipboard

CMake integration

Open promgamer opened this issue 7 years ago • 9 comments

Hi, would you accept a PR with CMake integration? I would like to use this as a third party library, but it is hard to integrate this repo as a submodule.

promgamer avatar Dec 14 '17 17:12 promgamer

Sure. If you're willing to make a nuget/conan package, that would be great too. Try to get it working in both CI systems with CMake too.

d-led avatar Dec 14 '17 17:12 d-led

I'm not a conan expert, although I'm using it for cpprestsdk. One of the problems that I've found out, is there's no "findCpprestsdk.cmake" file, so we can't do a find_package(cpprestsdk) easily (I think it will fail if we get cpprestsdk via conan)

promgamer avatar Dec 14 '17 18:12 promgamer

So, will you build it as part of the cmake build?

d-led avatar Dec 15 '17 08:12 d-led

Seems like v2.10.0 will support find_package. From the release notes:

  • Added CMake config-file support to installation. This should be consumed by doing:
find_package(cpprestsdk REQUIRED)
target_link_libraries(my_executable PRIVATE cpprestsdk::cpprest)

I've forked this repo and will work on it :smile:

promgamer avatar Dec 15 '17 23:12 promgamer

P.S. updated the submodules git submodule update --remote, in case you want to merge upstream

d-led avatar Dec 17 '17 14:12 d-led

As far as I see, no breaking changes. I'll update my remote with this. I'll propose a PR for this issue within some days.

promgamer avatar Dec 17 '17 20:12 promgamer

How is it going? I see there's even a fork of your fork

d-led avatar Feb 26 '18 18:02 d-led

Hi, I'm really sorry for not doing the MR sooner. I found a problem with CppReskSDK: their FindXXX.cmake is not working properly when you use Conan; they fixed it on 2.10, but 2.10 is not yet available on conan packages by bincrafters (it's on testing branch). As a result, I was waiting for it to go stable in order to propose the MR.

promgamer avatar Feb 27 '18 10:02 promgamer

ok. Let's wait

d-led avatar Feb 27 '18 11:02 d-led