From 4326a2e002448c4fc69913d1a838dae89f0072b0 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Fri, 3 Oct 2014 15:34:53 -0600 Subject: cmake: Lift common glslang definitions up to main CMakeLists --- CMakeLists.txt | 22 +++++++++++++++++----- 1 file 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 -- cgit v1.2.3