summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 05ee49eb677ba0dbd278fc5793bf93d80a9ac7a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 2.8)
project(kms++)

IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE Release CACHE STRING
      "Choose the type of build, options are: Debug, Release."
      FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)

set(LIBKMS_ENABLE_PYTHON ON CACHE BOOL "Enable Python wrappers")
set(LIBKMS_ENABLE_LUA OFF CACHE BOOL "Enable Lua wrappers")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")

set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

# static link libc
# set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")

find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBDRM libdrm REQUIRED)

enable_testing()

add_subdirectory(libkms++)
add_subdirectory(libkmstest)
add_subdirectory(tests)

if(LIBKMS_ENABLE_PYTHON)
        add_subdirectory(py)
endif()

if(LIBKMS_ENABLE_LUA)
        add_subdirectory(lua)
endif()