forked from gnuradio/gnuradio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
100 lines (83 loc) · 2.88 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright 2013,2019 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
########################################################################
# Setup dependencies
########################################################################
include(GrBoost)
include(GrPython)
find_package(MPLIB REQUIRED)
########################################################################
# Setup compatibility checks and defines
########################################################################
include(${CMAKE_CURRENT_SOURCE_DIR}/ConfigChecks.cmake)
GR_CHECK_LINUX_SCHED_AVAIL()
########################################################################
# Register component
########################################################################
include(GrComponent)
GR_REGISTER_COMPONENT("gnuradio-runtime" ENABLE_GNURADIO_RUNTIME
Boost_FOUND
PYTHONINTERP_FOUND
MPLIB_FOUND
LOG4CPP_FOUND
pybind11_FOUND
)
get_filename_component(GNURADIO_RUNTIME_PYTHONPATH
${CMAKE_SOURCE_DIR}/python ABSOLUTE
)
########################################################################
# Register controlport component
########################################################################
GR_REGISTER_COMPONENT("gr-ctrlport" ENABLE_GR_CTRLPORT
Boost_FOUND
ENABLE_GNURADIO_RUNTIME
)
########################################################################
# Begin conditional configuration
########################################################################
if(ENABLE_GNURADIO_RUNTIME)
get_filename_component(GR_RUNTIME_PYTHONPATH
${CMAKE_CURRENT_SOURCE_DIR}/python ABSOLUTE
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-runtime.conf.in
${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime.conf
@ONLY)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime.conf
DESTINATION ${GR_PREFSDIR}
)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/gr_log_default.conf
DESTINATION ${GR_PREFSDIR}
)
set(PC_ADD_LIBS "${MPLIB_PC_ADD_LIBS} ${PC_ADD_LIBS}")
set(PC_ADD_CFLAGS ${MPLIB_PC_ADD_CFLAGS})
########################################################################
# Add subdirectories
########################################################################
add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(apps)
if(ENABLE_PYTHON)
add_subdirectory(python)
if (ENABLE_EXAMPLES)
add_subdirectory(examples)
endif (ENABLE_EXAMPLES)
endif(ENABLE_PYTHON)
########################################################################
# Create Pkg Config File
########################################################################
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-runtime.pc.in
${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime.pc
@ONLY)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime.pc
DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
)
endif(ENABLE_GNURADIO_RUNTIME)