kmscube: remove unused field
[android/external-libkmsxx.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8)
2 project(kms++)
4 IF(NOT CMAKE_BUILD_TYPE)
5   SET(CMAKE_BUILD_TYPE Release CACHE STRING
6       "Choose the type of build, options are: Debug, Release."
7       FORCE)
8 ENDIF(NOT CMAKE_BUILD_TYPE)
10 set(LIBKMS_ENABLE_PYTHON ON CACHE BOOL "Enable Python wrappers")
11 set(LIBKMS_ENABLE_KMSCUBE OFF CACHE BOOL "Enable kmscube")
12 set(LIBKMS_ENABLE_LTO OFF CACHE BOOL "Enable LTO")
14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
15 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wno-unused-parameter")
17 set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
19 # static link libc
20 # set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
22 if(LIBKMS_ENABLE_LTO)
23         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -fwhole-program")
24         set(CMAKE_AR gcc-ar)
25         set(CMAKE_RANLIB gcc-ranlib)
26 endif()
28 find_package(PkgConfig REQUIRED)
29 pkg_check_modules(LIBDRM libdrm REQUIRED)
31 enable_testing()
33 add_subdirectory(libkms++)
34 add_subdirectory(libkmstest)
35 add_subdirectory(tests)
37 if(LIBKMS_ENABLE_KMSCUBE)
38         add_subdirectory(kmscube)
39 endif()
41 if(LIBKMS_ENABLE_PYTHON)
42         add_subdirectory(py)
43 endif()