2014-10-03 21:34:53 +00:00
|
|
|
# The name of our project is "XGL". CMakeLists files in this project can
|
|
|
|
# refer to the root source directory of the project as ${XGL_SOURCE_DIR} and
|
|
|
|
# to the root binary directory of the project as ${XGL_BINARY_DIR}.
|
|
|
|
cmake_minimum_required (VERSION 2.6)
|
|
|
|
project (XGL)
|
2014-08-01 19:01:47 +00:00
|
|
|
# set (CMAKE_VERBOSE_MAKEFILE 1)
|
2014-07-24 14:36:15 +00:00
|
|
|
|
|
|
|
# Header file for CMake settings
|
|
|
|
include_directories("${PROJECT_SOURCE_DIR}/include")
|
|
|
|
|
2014-08-02 01:14:28 +00:00
|
|
|
include(FindPkgConfig)
|
|
|
|
|
2014-08-04 00:03:57 +00:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCC)
|
2014-12-15 16:07:11 +00:00
|
|
|
set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers")
|
2014-12-19 03:34:46 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${COMMON_COMPILE_FLAGS}")
|
2014-12-15 16:07:11 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS}")
|
2014-08-04 00:03:57 +00:00
|
|
|
if (UNIX)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
|
|
|
endif()
|
|
|
|
endif()
|
2014-08-02 01:14:28 +00:00
|
|
|
|
2014-10-03 21:34:53 +00:00
|
|
|
# Hard code our LunarGLASS and glslang paths for now
|
|
|
|
get_filename_component(GLSLANG_PREFIX ../glslang ABSOLUTE)
|
|
|
|
get_filename_component(LUNARGLASS_PREFIX ../LunarGLASS ABSOLUTE)
|
|
|
|
|
|
|
|
if(NOT EXISTS ${GLSLANG_PREFIX})
|
|
|
|
message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT EXISTS ${LUNARGLASS_PREFIX})
|
|
|
|
message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${GLSLANG_PREFIX})
|
|
|
|
endif()
|
|
|
|
|
2014-08-01 03:21:23 +00:00
|
|
|
# loader: Generic XGL ICD loader
|
2014-08-03 01:50:47 +00:00
|
|
|
# icd: Device dependent (DD) XGL components
|
2014-07-24 14:36:15 +00:00
|
|
|
# tests: XGL tests
|
2014-08-03 01:50:47 +00:00
|
|
|
add_subdirectory(loader)
|
|
|
|
add_subdirectory(icd)
|
|
|
|
add_subdirectory(tests)
|
2014-10-15 01:15:22 +00:00
|
|
|
add_subdirectory(layers)
|
2014-09-13 03:12:55 +00:00
|
|
|
add_subdirectory(demos)
|
2014-11-14 21:00:22 +00:00
|
|
|
add_subdirectory(tools/glave)
|