blob: f2b5483b414d60c6fd2abc5e172004b1d0ecc44d [file] [log] [blame]
Courtney Goeltzenleuchter62b2e852014-10-03 15:34:53 -06001# 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}.
4cmake_minimum_required (VERSION 2.6)
5project (XGL)
Courtney Goeltzenleuchter1d22ed82014-08-01 13:01:47 -06006# set (CMAKE_VERBOSE_MAKEFILE 1)
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -06007
8# Header file for CMake settings
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -06009include_directories("${PROJECT_SOURCE_DIR}/include")
10
Chia-I Wu155be032014-08-02 09:14:28 +080011include(FindPkgConfig)
Chia-I Wu155be032014-08-02 09:14:28 +080012
Chia-I Wu468e3c32014-08-04 08:03:57 +080013if (CMAKE_COMPILER_IS_GNUCC)
Chia-I Wu7c66b6b2014-12-16 00:07:11 +080014 set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers")
Chia-I Wu5a782ae2014-12-19 11:34:46 +080015 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${COMMON_COMPILE_FLAGS}")
Chia-I Wu7c66b6b2014-12-16 00:07:11 +080016 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS}")
Chia-I Wu468e3c32014-08-04 08:03:57 +080017 if (UNIX)
18 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
19 endif()
20endif()
Chia-I Wu155be032014-08-02 09:14:28 +080021
Courtney Goeltzenleuchter62b2e852014-10-03 15:34:53 -060022# Hard code our LunarGLASS and glslang paths for now
23get_filename_component(GLSLANG_PREFIX ../glslang ABSOLUTE)
24get_filename_component(LUNARGLASS_PREFIX ../LunarGLASS ABSOLUTE)
25
26if(NOT EXISTS ${GLSLANG_PREFIX})
27 message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX})
28endif()
29
30if(NOT EXISTS ${LUNARGLASS_PREFIX})
31 message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${GLSLANG_PREFIX})
32endif()
33
Chia-I Wu5f72d0f2014-08-01 11:21:23 +080034# loader: Generic XGL ICD loader
Chia-I Wu41eddec2014-08-03 09:50:47 +080035# icd: Device dependent (DD) XGL components
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -060036# tests: XGL tests
Chia-I Wu41eddec2014-08-03 09:50:47 +080037add_subdirectory(loader)
38add_subdirectory(icd)
39add_subdirectory(tests)
Jon Ashburnd43f9b62014-10-14 19:15:22 -060040add_subdirectory(layers)
Chia-I Wuc19795a2014-09-13 11:12:55 +080041add_subdirectory(demos)
Jon Ashburnccaac532014-11-14 14:00:22 -070042add_subdirectory(tools/glave)