aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtney@LunarG.com>2014-10-03 15:34:53 -0600
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2014-10-31 15:29:14 -0600
commit4326a2e002448c4fc69913d1a838dae89f0072b0 (patch)
treed1b4dd23dea28fcfde58a9a8b09c5377050ca78b
parentbaeff0c1d5b8af43196bc6a7bc7660a39e7ed7a3 (diff)
downloadusermoji-4326a2e002448c4fc69913d1a838dae89f0072b0.tar.xz
cmake: Lift common glslang definitions up to main CMakeLists
-rw-r--r--CMakeLists.txt22
1 files changed, 17 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a0db8d8..aceeed1d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,8 @@
-# The name of our project is "XGL". CMakeLists files in this project can
-# refer to the root source directory of the project as ${XGL_SOURCE_DIR} and
-# to the root binary directory of the project as ${XGL_BINARY_DIR}.
-cmake_minimum_required (VERSION 2.6)
-project (XGL)
+# The name of our project is "XGL". CMakeLists files in this project can
+# refer to the root source directory of the project as ${XGL_SOURCE_DIR} and
+# to the root binary directory of the project as ${XGL_BINARY_DIR}.
+cmake_minimum_required (VERSION 2.6)
+project (XGL)
# set (CMAKE_VERBOSE_MAKEFILE 1)
# Header file for CMake settings
@@ -17,6 +17,18 @@ if (CMAKE_COMPILER_IS_GNUCC)
endif()
endif()
+# Hard code our LunarGLASS and glslang paths for now
+get_filename_component(GLSLANG_PREFIX ../glslang ABSOLUTE)
+get_filename_component(LUNARGLASS_PREFIX ../LunarGLASS ABSOLUTE)
+
+if(NOT EXISTS ${GLSLANG_PREFIX})
+ message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX})
+endif()
+
+if(NOT EXISTS ${LUNARGLASS_PREFIX})
+ message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${GLSLANG_PREFIX})
+endif()
+
# loader: Generic XGL ICD loader
# icd: Device dependent (DD) XGL components
# tests: XGL tests