summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorYehonal <g.ronca@hyperweb2.com>2016-07-25 17:29:20 +0200
committerYehonal <yehonal.azeroth@gmail.com>2016-08-07 12:02:55 +0200
commitd1b8eea42f298a624a9513c42a7747613b0d61c9 (patch)
tree70c7a00e237907edc7806502e45a885037b181df /CMakeLists.txt
parentb91b679669eba2f0d9aafb645c6e7f8c9ed3fc29 (diff)
configuration system for cmake
- moved cmake options under conf and created default/custom configuration system for cmake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 11 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a57662fd1b..143038b0fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,11 +28,6 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1)
# set macro-directory
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/cmake/macros")
-# build in Release-mode by default if not explicitly set
-if( NOT CMAKE_BUILD_TYPE )
- set(CMAKE_BUILD_TYPE "Release")
-endif()
-
include(CheckCXXSourceRuns)
include(CheckIncludeFiles)
@@ -40,7 +35,17 @@ include(CheckIncludeFiles)
include(src/cmake/utils.cmake)
# set default buildoptions and print them
-include(src/cmake/options.cmake)
+include(conf/config.cmake.dist)
+
+# load custom configurations for cmake if exists
+if(EXISTS "conf/config.cmake")
+ include(conf/config.cmake)
+endif()
+
+# build in Release-mode by default if not explicitly set
+if( NOT CMAKE_BUILD_TYPE )
+ set(CMAKE_BUILD_TYPE "Release")
+endif()
# turn off PCH totally if enabled (hidden setting, mainly for devs)
if( NOPCH )