-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
40 lines (29 loc) · 1.13 KB
/
CMakeLists.txt
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
set(NLUTILS_VERSION 0.12.10)
set(NLUTILS_SO_VERSION 12)
cmake_minimum_required(VERSION 2.6)
# Prevent project() from clearing VERSION variables
if(POLICY CMP0048)
cmake_policy(SET CMP0048 OLD)
endif()
# Allow setting COMPILE_DEFINITIONS_DEBUG
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
project(NLUTILS)
# Prevent absolute paths from being compiled in
set(CMAKE_USE_RELATIVE_PATHS true)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99 -D_XOPEN_SOURCE=700 -D_ISOC99_SOURCE -D_GNU_SOURCE -fPIC -pthread -Wall -Wextra -Werror -pipe -DNLUTILS_VERSION=\"\\\"${NLUTILS_VERSION}\\\"\" -D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1")
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG DEBUG=1)
include_directories(BEFORE include/)
add_subdirectory(src)
add_subdirectory(programs)
add_subdirectory(tests)
if(NL_EMBEDDED)
add_subdirectory(embedded)
else(NL_EMBEDDED)
add_subdirectory(tools)
endif(NL_EMBEDDED)
if(NL_INSTALL_HEADERS OR (NOT NL_EMBEDDED AND NOT NL_PACKAGE))
install(DIRECTORY include/ DESTINATION include/nlutils
FILES_MATCHING PATTERN "*.h")
endif(NL_INSTALL_HEADERS OR (NOT NL_EMBEDDED AND NOT NL_PACKAGE))