Courtney Goeltzenleuchter | a43bbd8 | 2014-10-03 15:34:53 -0600 | [diff] [blame] | 1 | # The name of our project is "XGL". CMakeLists files in this project can |
| 2 | # refer to the root source directory of the project as ${XGL_SOURCE_DIR} and |
| 3 | # to the root binary directory of the project as ${XGL_BINARY_DIR}. |
| 4 | cmake_minimum_required (VERSION 2.6) |
| 5 | project (XGL) |
Courtney Goeltzenleuchter | 1d22ed8 | 2014-08-01 13:01:47 -0600 | [diff] [blame] | 6 | # set (CMAKE_VERBOSE_MAKEFILE 1) |
Courtney Goeltzenleuchter | 2220a3b | 2014-07-24 08:36:15 -0600 | [diff] [blame] | 7 | |
| 8 | # Header file for CMake settings |
Courtney Goeltzenleuchter | 2220a3b | 2014-07-24 08:36:15 -0600 | [diff] [blame] | 9 | include_directories("${PROJECT_SOURCE_DIR}/include") |
| 10 | |
Chia-I Wu | 155be03 | 2014-08-02 09:14:28 +0800 | [diff] [blame] | 11 | include(FindPkgConfig) |
Chia-I Wu | 155be03 | 2014-08-02 09:14:28 +0800 | [diff] [blame] | 12 | |
Chia-I Wu | 1930060 | 2014-08-04 08:03:57 +0800 | [diff] [blame] | 13 | if (CMAKE_COMPILER_IS_GNUCC) |
| 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Werror -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter") |
| 15 | if (UNIX) |
| 16 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") |
| 17 | endif() |
| 18 | endif() |
Chia-I Wu | 155be03 | 2014-08-02 09:14:28 +0800 | [diff] [blame] | 19 | |
Courtney Goeltzenleuchter | a43bbd8 | 2014-10-03 15:34:53 -0600 | [diff] [blame] | 20 | # Hard code our LunarGLASS and glslang paths for now |
| 21 | get_filename_component(GLSLANG_PREFIX ../glslang ABSOLUTE) |
| 22 | get_filename_component(LUNARGLASS_PREFIX ../LunarGLASS ABSOLUTE) |
| 23 | |
| 24 | if(NOT EXISTS ${GLSLANG_PREFIX}) |
| 25 | message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX}) |
| 26 | endif() |
| 27 | |
| 28 | if(NOT EXISTS ${LUNARGLASS_PREFIX}) |
| 29 | message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${GLSLANG_PREFIX}) |
| 30 | endif() |
| 31 | |
Chia-I Wu | 5f72d0f | 2014-08-01 11:21:23 +0800 | [diff] [blame] | 32 | # loader: Generic XGL ICD loader |
Chia-I Wu | b72e87d | 2014-08-03 09:50:47 +0800 | [diff] [blame] | 33 | # icd: Device dependent (DD) XGL components |
Courtney Goeltzenleuchter | 2220a3b | 2014-07-24 08:36:15 -0600 | [diff] [blame] | 34 | # tests: XGL tests |
Chia-I Wu | b72e87d | 2014-08-03 09:50:47 +0800 | [diff] [blame] | 35 | add_subdirectory(loader) |
| 36 | add_subdirectory(icd) |
| 37 | add_subdirectory(tests) |
Jon Ashburn | d38bfb1 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 38 | add_subdirectory(layers) |
Chia-I Wu | 81d45b2 | 2014-09-13 11:12:55 +0800 | [diff] [blame^] | 39 | add_subdirectory(demos) |