From 43591b71e8d69e2184cf1eafb8de05988b8dab53 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Wed, 4 Oct 2017 11:53:16 +0100 Subject: Add conan.io to project & add Boost to Hello World --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b29582d..d70caad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,17 @@ file(GLOB_RECURSE sources src/main/*.cpp src/main/*.h) file(GLOB_RECURSE sources_test src/test/*.cpp) file(GLOB_RECURSE data resources/*) +############################################################################### +## conan.io setup ############################################################# +############################################################################### + +if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) + include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) + conan_basic_setup() +else() + message(WARNING "The file conanbuildinfo.cmake doesn't exist, you have to run conan install first") +endif() + ############################################################################### ## target definitions ######################################################### ############################################################################### @@ -29,6 +40,9 @@ target_compile_options(solitaire_pip PUBLIC -std=c++1y -Wall -Wfloat-conversion) # this lets me include files relative to the root src dir with a <> pair target_include_directories(solitaire_pip PUBLIC src/main) +# link conan libraries +target_link_libraries(solitaire_pip ${CONAN_LIBS}) + # this copies all resource files in the build directory # we need this, because we want to work with paths relative to the executable file(COPY ${data} DESTINATION resources) -- cgit v1.2.1