1 # The name of our project is "VULKAN". CMakeLists files in this project can
2 # refer to the root source directory of the project as ${VULKAN_SOURCE_DIR} and
3 # to the root binary directory of the project as ${VULKAN_BINARY_DIR}.
4 cmake_minimum_required(VERSION 2.8.11)
6 # set (CMAKE_VERBOSE_MAKEFILE 1)
8 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
10 # Header file for CMake settings
11 include_directories("${PROJECT_SOURCE_DIR}/include")
13 include(FindPkgConfig)
15 if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
16 set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
17 set(COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -fno-strict-aliasing -fno-builtin-memcmp")
18 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${COMMON_COMPILE_FLAGS}")
19 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS}")
21 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
22 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
27 # Hard code our LunarGLASS and glslang paths for now
28 get_filename_component(GLSLANG_PREFIX ../glslang ABSOLUTE)
29 get_filename_component(LUNARGLASS_PREFIX ../LunarGLASS ABSOLUTE)
31 if(NOT EXISTS ${GLSLANG_PREFIX})
32 message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX})
35 if(NOT EXISTS ${LUNARGLASS_PREFIX})
36 message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${GLSLANG_PREFIX})
38 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
39 set(PYTHON_CMD "python3")
45 # loader: Generic VULKAN ICD loader
46 # icd: Device dependent (DD) VULKAN components
48 add_subdirectory(loader)
51 add_subdirectory(tests)
53 add_subdirectory(layers)
54 add_subdirectory(libs)
55 add_subdirectory(demos)
56 add_subdirectory(tools/glave)