blob: c62689d18893adc2af22152f9dd95e409cfa4ef6 [file] [log] [blame]
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -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)
6set (XGL_VERSION_MAJOR 0)
7set (XGL_VERSION_MINOR 1)
Courtney Goeltzenleuchter1d22ed82014-08-01 13:01:47 -06008# set (CMAKE_VERBOSE_MAKEFILE 1)
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -06009
10# Header file for CMake settings
11configure_file (
12 "${PROJECT_SOURCE_DIR}/include/XGLConfig.h.in"
13 "${PROJECT_BINARY_DIR}/XGLConfig.h"
14 )
15
16include_directories("${PROJECT_BINARY_DIR}")
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -060017include_directories("${PROJECT_SOURCE_DIR}/include")
18
Chia-I Wu155be032014-08-02 09:14:28 +080019
20include(FindPkgConfig)
21pkg_check_modules(LIBDRM REQUIRED libdrm)
22if (NOT LIBDRM_FOUND)
23 message(FATAL_ERROR "libdrm not found")
24endif()
25
Chia-I Wu763e5592014-08-01 15:31:12 +080026set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall")
Chia-I Wu155be032014-08-02 09:14:28 +080027
Courtney Goeltzenleuchtercec72952014-08-01 18:06:40 -060028set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
29include(GetGitRevisionDescription)
30get_git_head_revision(GIT_REFSPEC GIT_SHA1)
Chia-I Wu763e5592014-08-01 15:31:12 +080031
Chia-I Wu5f72d0f2014-08-01 11:21:23 +080032# loader: Generic XGL ICD loader
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -060033# main: Device independent (DI) XGL library
34# drivers: Device dependent (DD) XGL components
35# tests: XGL tests
Chia-I Wu5f72d0f2014-08-01 11:21:23 +080036add_subdirectory (loader)
Courtney Goeltzenleuchter2220a3b2014-07-24 08:36:15 -060037add_subdirectory (drivers)
38add_subdirectory (tests)