[CMake] include restbed in my project

Christofer Jennings bozmoz at gmail.com
Wed May 9 19:10:33 EDT 2018


Thanks for the reply. I haven't figured out how to use add_subdirectories
like you suggested but I was able to get it working based on this
https://github.com/josesj/rest-json-cpp-boilerplate

It uses find_package and etc. ... maybe a little overkill, I don't know.
But at least I got off the ground. :)

On Sat, May 5, 2018 at 12:09 PM J Decker <d3ck0r at gmail.com> wrote:

> for such things I often include the sources in my tree and just
> 'add_subdirectory( "extra/restbed" )'
> it's cleaner to do a external project rule...
> which can download/checkout sources and then build those and the output is
> findable by other projects just by referencing the targets.
> https://cmake.org/cmake/help/latest/module/ExternalProject.html
>
> On Sat, May 5, 2018 at 11:21 AM, Christofer Jennings <bozmoz at gmail.com>
> wrote:
>
>> Hi All,
>>
>> How do you use a 3rd party dependency like restbed in a cmake build?
>>
>> Total nube here. First dive into CMake and haven't done C++ for a long
>> long time. So forgive my ignorance :) This could just as easily be an "I
>> forgot C++" as an "I don't know CMake"...
>>
>> I'm trying to use restbed. I've got it to compile and self test with
>> `cmake, `make install`, and `make test` as directed on the site:
>> https://github.com/Corvusoft/restbed#build
>> It makes a `distribution` folder with `include` and `library`
>> sub-folders. The `library` has .a and .so or .dylib files. The `include`
>> folder just has headers, and a `restbed` file with #includes in it.
>>
>> I'm using the example on the same page as starting point:
>> https://github.com/Corvusoft/restbed#example
>>
>> ... I could list out my failed attempts but I don't think it'd help.
>> Basically find_package doesn't find it, and other things I've tried don't
>> work. I'm digging around online but so far nothing seems to fit--which
>> makes me think it's something really really simple that I just don't
>> understand.
>>
>> Thanks!
>> -Chris
>>
>>
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> https://cmake.org/mailman/listinfo/cmake
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180509/48224256/attachment.html>


More information about the CMake mailing list