blob: aceeed1dab3a991ed4023c573bf5bb7a3fdbf9f5 [file] [log] [blame]
Courtney Goeltzenleuchtera43bbd82014-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 Wu19300602014-08-04 08:03:57 +080013if (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()
18endif()
Chia-I Wu155be032014-08-02 09:14:28 +080019
Courtney Goeltzenleuchtera43bbd82014-10-03 15:34:53 -060020# Hard code our LunarGLASS and glslang paths for now
21get_filename_component(GLSLANG_PREFIX ../glslang ABSOLUTE)
22get_filename_component(LUNARGLASS_PREFIX ../LunarGLASS ABSOLUTE)
23
24if(NOT EXISTS ${GLSLANG_PREFIX})
25 message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX})
26endif()
27
28if(NOT EXISTS ${LUNARGLASS_PREFIX})
29 message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${GLSLANG_PREFIX})
30endif()
31
Chia-I Wu5f72d0f2014-08-01 11:21:23 +080032# loader: Generic XGL ICD loader
Chia-I Wub72e87d2014-08-03 09:50:47 +080033# icd: Device dependent (DD) XGL components
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -060034# tests: XGL tests
Chia-I Wub72e87d2014-08-03 09:50:47 +080035add_subdirectory(loader)
36add_subdirectory(icd)
37add_subdirectory(tests)
Jon Ashburnd38bfb12014-10-14 19:15:22 -060038add_subdirectory(layers)