aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorthecharlesblake2017-10-04 11:53:16 +0100
committerthecharlesblake2017-10-13 18:46:14 +0100
commit43591b71e8d69e2184cf1eafb8de05988b8dab53 (patch)
tree37f411591e2ac6b48f3d6a7bb25035a6ff6f7750 /CMakeLists.txt
parentAdd build instructions file (diff)
downloadmetasol-43591b71e8d69e2184cf1eafb8de05988b8dab53.tar.gz
metasol-43591b71e8d69e2184cf1eafb8de05988b8dab53.zip

Add conan.io to project & add Boost to Hello World

Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b29582d..d70caad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,17 @@ 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)