-
Notifications
You must be signed in to change notification settings - Fork 35
/
CMakeListsGlobal.cmake
53 lines (40 loc) · 1.54 KB
/
CMakeListsGlobal.cmake
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
project (OONF C)
if (NOT OONF_NO_TESTING)
ENABLE_TESTING()
endif (NOT OONF_NO_TESTING)
#####################################
#### set path to source for apps ####
#####################################
SET(APP_DATA_C_IN ${CMAKE_CURRENT_LIST_DIR}/src/main/app_data.c.in)
SET(MAIN_C ${CMAKE_CURRENT_LIST_DIR}/src/main/main.c)
SET(VERSION_CMAKE_IN ${CMAKE_CURRENT_LIST_DIR}/cmake/files/version.cmake.in)
SET(VERSION_SOURCE_DIR ${CMAKE_SOURCE_DIR})
SET(VERSION_SOURCE_SUB_DIR ${CMAKE_CURRENT_LIST_DIR})
#################################
#### add include directories ####
#################################
include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
include_directories(${CMAKE_BINARY_DIR})
###########################
#### API configuration ####
###########################
# add define for length of base path
string(LENGTH "${CMAKE_SOURCE_DIR}/" BASELENGTH)
add_definitions(-DBASEPATH_LENGTH=${BASELENGTH})
# set cached variables
include (${CMAKE_CURRENT_LIST_DIR}/cmake/lib_config.cmake)
# include compiler flags
include (${CMAKE_CURRENT_LIST_DIR}/cmake/cc_flags.cmake)
# helper for test case creation
include (${CMAKE_CURRENT_LIST_DIR}/cmake/create_test.cmake)
########################################
#### get repository tag and version ####
########################################
include (${CMAKE_CURRENT_LIST_DIR}/cmake/get_version.cmake)
IF(EXISTS "${CMAKE_BINARY_DIR}/version.cmake")
include (${CMAKE_BINARY_DIR}/version.cmake)
ENDIF()