697e7177a5e8a41349368bb85cc7a64f7035f680
[oonf.git] / CMakeListsGlobal.cmake
1 cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
2 if(POLICY CMP0048)
3   cmake_policy(SET CMP0048 NEW)
4 endif()
5
6 project (OONF C)
7
8 #####################################
9 #### set path to source for apps ####
10 #####################################
11
12 SET(APP_DATA_C_IN ${CMAKE_CURRENT_LIST_DIR}/src/main/app_data.c.in)
13 SET(MAIN_C ${CMAKE_CURRENT_LIST_DIR}/src/main/main.c)
14 SET(VERSION_CMAKE_IN ${CMAKE_CURRENT_LIST_DIR}/cmake/files/version.cmake.in)
15 SET(VERSION_SOURCE_DIR ${CMAKE_SOURCE_DIR})
16 SET(VERSION_SOURCE_SUB_DIR ${CMAKE_CURRENT_LIST_DIR})
17
18 #################################
19 #### add include directories ####
20 #################################
21
22 include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
23 include_directories(${CMAKE_BINARY_DIR})
24
25 ###########################
26 #### API configuration ####
27 ###########################
28
29 # set cached variables
30 include (${CMAKE_CURRENT_LIST_DIR}/cmake/lib_config.cmake)
31
32 # include compiler flags
33 include (${CMAKE_CURRENT_LIST_DIR}/cmake/cc_flags.cmake)
34
35 ########################################
36 #### get repository tag and version ####
37 ########################################
38
39 include (${CMAKE_CURRENT_LIST_DIR}/cmake/get_version.cmake)
40 IF(EXISTS "${CMAKE_BINARY_DIR}/version.cmake")
41   include (${CMAKE_BINARY_DIR}/version.cmake)
42 ENDIF()