Courtney Goeltzenleuchter | 62b2e85 | 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 | 468e3c3 | 2014-08-04 08:03:57 +0800 | [diff] [blame] | 13 | if (CMAKE_COMPILER_IS_GNUCC) |
Chia-I Wu | 7c66b6b | 2014-12-16 00:07:11 +0800 | [diff] [blame] | 14 | set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers") |
Chia-I Wu | 5a782ae | 2014-12-19 11:34:46 +0800 | [diff] [blame] | 15 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${COMMON_COMPILE_FLAGS}") |
Chia-I Wu | 7c66b6b | 2014-12-16 00:07:11 +0800 | [diff] [blame] | 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS}") |
Chia-I Wu | 468e3c3 | 2014-08-04 08:03:57 +0800 | [diff] [blame] | 17 | if (UNIX) |
| 18 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") |
| 19 | endif() |
| 20 | endif() |
Chia-I Wu | 155be03 | 2014-08-02 09:14:28 +0800 | [diff] [blame] | 21 | |
Courtney Goeltzenleuchter | 62b2e85 | 2014-10-03 15:34:53 -0600 | [diff] [blame] | 22 | # Hard code our LunarGLASS and glslang paths for now |
| 23 | get_filename_component(GLSLANG_PREFIX ../glslang ABSOLUTE) |
| 24 | get_filename_component(LUNARGLASS_PREFIX ../LunarGLASS ABSOLUTE) |
| 25 | |
| 26 | if(NOT EXISTS ${GLSLANG_PREFIX}) |
| 27 | message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX}) |
| 28 | endif() |
| 29 | |
| 30 | if(NOT EXISTS ${LUNARGLASS_PREFIX}) |
| 31 | message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${GLSLANG_PREFIX}) |
| 32 | endif() |
| 33 | |
Chia-I Wu | 5f72d0f | 2014-08-01 11:21:23 +0800 | [diff] [blame] | 34 | # loader: Generic XGL ICD loader |
Chia-I Wu | 41eddec | 2014-08-03 09:50:47 +0800 | [diff] [blame] | 35 | # icd: Device dependent (DD) XGL components |
Courtney Goeltzenleuchter | 2220a3b | 2014-07-24 08:36:15 -0600 | [diff] [blame] | 36 | # tests: XGL tests |
Chia-I Wu | 41eddec | 2014-08-03 09:50:47 +0800 | [diff] [blame] | 37 | add_subdirectory(loader) |
| 38 | add_subdirectory(icd) |
| 39 | add_subdirectory(tests) |
Jon Ashburn | d43f9b6 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 40 | add_subdirectory(layers) |
Chia-I Wu | c19795a | 2014-09-13 11:12:55 +0800 | [diff] [blame] | 41 | add_subdirectory(demos) |
Jon Ashburn | ccaac53 | 2014-11-14 14:00:22 -0700 | [diff] [blame] | 42 | add_subdirectory(tools/glave) |