Re: [CMake] CMAKE_ARGS for FetchContent

2018-07-06 Thread Craig Scott
On Fri, Jul 6, 2018 at 9:49 PM, Mads Andreasen wrote: > Hi Craig > > Thanks for getting back to me. > I was hoping to be able to build the library with fetch content, so that > the FindXXX would automatically work. > If you want to use FindXXX, you need to use ExternalProject and a superbuild st

Re: [CMake] CMAKE_ARGS for FetchContent

2018-07-06 Thread Mads Andreasen
Hi Craig Thanks for getting back to me. I was hoping to be able to build the library with fetch content, so that the FindXXX would automatically work. If I use your proposed approach: if(NOT jsoncpp_POPULATED) FetchContent_Populate(jsoncpp) add_subdirectory(${jsoncpp_SOURCE_DIR} ${jsoncpp_

Re: [CMake] CMAKE_ARGS for FetchContent

2018-07-06 Thread Craig Scott
On Fri, Jul 6, 2018 at 8:25 PM, Mads Andreasen wrote: > Hi, > > I am trying to work with FetchContent in cmake 3.11. > I want to use the jsoncpp library and use FetchContent to get and build it. > FetchContent can only download it. You need to build it as a separate step (you should avoid buildi

[CMake] CMAKE_ARGS for FetchContent

2018-07-06 Thread Mads Andreasen
Hi, I am trying to work with FetchContent in cmake 3.11. I want to use the jsoncpp library and use FetchContent to get and build it. I also want to configure the jsoncpp build with some cmake arguments and I can't seem to get that right. My CMakeLists.txt looks like this: ***