summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2013-08-19 22:33:33 -0700
committerChad Versace <chad.versace@linux.intel.com>2013-08-19 23:45:47 -0700
commit4915962cb59ffa7c7c0eae799595fca5f4ca5ba7 (patch)
tree63aecb0b63409d7785d5043895039e5a4fafc686
parent6fcbe52d4210891da31838efb8fbc4d7aab7aa68 (diff)
cmake: Refactor definition of internal options
Move definition of internal options into a new module WaffleDefineInternalOptions. This change belongs to a series that cleans up the toplevel CMakeLists by decompositing it into modules. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--CMakeLists.txt17
-rw-r--r--cmake/Modules/WaffleDefineInternalOptions.cmake11
2 files changed, 12 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87fe48e..d4892d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,7 @@ cmake_minimum_required(VERSION 2.8)
# ------------------------------------------------------------------------------
include(Options.cmake)
+include(WaffleDefineInternalOptions)
include(WaffleDefineVersion)
include(WaffleDefineCompilerFlags)
include(GNUInstallDirs)
@@ -64,22 +65,6 @@ if(DEFINED waffle_install_docdir)
"details.")
endif()
-#
-# Set internal options.
-#
-
-if(waffle_has_wayland OR waffle_has_x11_egl OR waffle_has_gbm)
- set(waffle_has_egl TRUE)
-else(waffle_has_wayland OR waffle_has_x11_egl)
- set(waffle_has_egl FALSE)
-endif()
-
-if(waffle_has_glx OR waffle_has_x11_egl)
- set(waffle_has_x11 TRUE)
-else()
- set(waffle_has_x11 FALSE)
-endif()
-
# ----------------------------------------------
# Validate waffle options
# ----------------------------------------------
diff --git a/cmake/Modules/WaffleDefineInternalOptions.cmake b/cmake/Modules/WaffleDefineInternalOptions.cmake
new file mode 100644
index 0000000..3ef7a25
--- /dev/null
+++ b/cmake/Modules/WaffleDefineInternalOptions.cmake
@@ -0,0 +1,11 @@
+if(waffle_has_wayland OR waffle_has_x11_egl OR waffle_has_gbm)
+ set(waffle_has_egl TRUE)
+else(waffle_has_wayland OR waffle_has_x11_egl)
+ set(waffle_has_egl FALSE)
+endif()
+
+if(waffle_has_glx OR waffle_has_x11_egl)
+ set(waffle_has_x11 TRUE)
+else()
+ set(waffle_has_x11 FALSE)
+endif()