Move included cmake files into CMakeListsGlobal to allow inclusion in wrapper projects
[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_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
16
17 #################################
18 #### add include directories ####
19 #################################
20
21 include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
22 include_directories(${CMAKE_BINARY_DIR})
23
24 ###########################
25 #### API configuration ####
26 ###########################
27
28 # set cached variables
29 include (${CMAKE_CURRENT_LIST_DIR}/cmake/lib_config.cmake)
30
31 # include compiler flags
32 include (${CMAKE_CURRENT_LIST_DIR}/cmake/cc_flags.cmake)
33
34 ########################################
35 #### get repository tag and version ####
36 ########################################
37
38 include (${CMAKE_CURRENT_LIST_DIR}/cmake/get_version.cmake)
39 IF(EXISTS "${CMAKE_BINARY_DIR}/version.cmake")
40   include (${CMAKE_BINARY_DIR}/version.cmake)
41 ENDIF()