-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
54 lines (42 loc) · 1.05 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 2.8)
project(marp C)
# Set project version information.
set(VERSION_FULL 0.1.2)
# Set configuration options.
option(CAPSICUM "Capsicum sandboxing (FreeBSD 10+)" ON)
# Set compiler to use C99 standard.
set(CMAKE_C_FLAGS "-std=c99")
# Set standard installation paths.
include(GNUInstallDirs)
# Look for required dependencies.
find_package(PkgConfig REQUIRED)
pkg_check_modules(HAMLIB REQUIRED hamlib)
# Check if Capsicum is available.
include(CheckIncludeFiles)
if (CAPSICUM)
check_include_files(sys/capability.h HAVE_CAPSICUM)
else()
set(HAVE_CAPSICUM FALSE)
endif()
# Write configuration to header file.
configure_file(
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
# Tell the compiler where to find header and library files.
include_directories(
${PROJECT_BINARY_DIR}
${HAMLIB_INCLUDE_DIRS}
)
link_directories(
${HAMLIB_LIBRARY_DIRS}
)
add_executable(marp
data.c
main.c
receiver.c
rotator.c
source.c
tests.c
)
target_link_libraries(marp ${HAMLIB_LIBRARIES})