From 425bfcd7dada7a0fc9ce50475fd47d1641decd62 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Thu, 24 Mar 2016 10:41:10 +0100
Subject: [PATCH] Run conan install in build dir.

---
 CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dba02ede5a3..3f401ca35b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,13 @@ set(OGS_CPU_ARCHITECTURE "native" CACHE STRING "Processor architecture, defaults
 option(OGS_BUILD_TESTS "Should the test executables be built?" ON)
 
 ### CMake includes ###
-include(conanbuildinfo.cmake)
+if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+	include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+elseif(EXISTS ${CMAKE_SOURCE_DIR}/conanbuildinfo.cmake)
+	include(${CMAKE_SOURCE_DIR}/conanbuildinfo.cmake)
+else()
+	message(FATAL_ERROR "External dependencies not setup. Run conan install!")
+endif()
 conan_basic_setup()
 
 include(scripts/cmake/CheckTypeSizes.cmake)
-- 
GitLab