Re: [CMake] How to link against projects added through FetchContent

2018-03-11 Thread Saad Khattak
Thank you for the clarifications Craig! The confusion mainly stemmed from ${Catch2_SOURCE_DIR} where 'Catch2' should have been lowercase. I had originally started with the name 'catch' (which would explain why I accidentally left it unchanged in the _GetProperties function) but when that didn't wor

Re: [CMake] How to link against projects added through FetchContent

2018-03-11 Thread Craig Scott
Thanks for trying out the new FetchContent module. Comments on your question interspersed below. On Mon, Mar 12, 2018 at 11:02 AM, Saad Khattak wrote: > Hi, > > I would like to know how to use the FetchContent properly so that I can > link against downloaded (CMake enabled) projects. I have loo

Re: [CMake] How to link against projects added through FetchContent

2018-03-11 Thread Saad Khattak
I managed to find a solution myself: `` cmake_minimum_required(VERSION 3.11) project(testProj) include(FetchContent) FetchContent_Declare( Catch2 GIT_REPOSITORY "https://github.com/catchorg/Catch2"; ) FetchContent_GetProperties(

[CMake] How to link against projects added through FetchContent

2018-03-11 Thread Saad Khattak
Hi, I would like to know how to use the FetchContent properly so that I can link against downloaded (CMake enabled) projects. I have looked at the CMake docs, which although are quite thorough, almost always fail to list a complete example which is incredibly crucial to get up and running quickly.