Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 475 lines (413 sloc) 17.875 kB
1e0c15b @ncorgan Windows compatibility fixes
ncorgan authored
1 # Copyright 2010-2012,2014 Free Software Foundation, Inc.
f919f9d @trondeau Removed whitespace and added dtools/bin/remove-whitespace as a tool t…
trondeau authored
2 #
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
3 # This file is part of GNU Radio
f919f9d @trondeau Removed whitespace and added dtools/bin/remove-whitespace as a tool t…
trondeau authored
4 #
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
5 # GNU Radio is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
8 # any later version.
f919f9d @trondeau Removed whitespace and added dtools/bin/remove-whitespace as a tool t…
trondeau authored
9 #
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
10 # GNU Radio is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
f919f9d @trondeau Removed whitespace and added dtools/bin/remove-whitespace as a tool t…
trondeau authored
14 #
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
15 # You should have received a copy of the GNU General Public License
16 # along with GNU Radio; see the file COPYING. If not, write to
17 # the Free Software Foundation, Inc., 51 Franklin Street,
18 # Boston, MA 02110-1301, USA.
19
20 ########################################################################
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
21 if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
f95a0ab @jmcorgan cmake: fix include path order in gruel
jmcorgan authored
22 message(FATAL_ERROR "Prevented in-tree build. This is bad practice.")
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
23 endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
24
25 ########################################################################
26 # Project setup
27 ########################################################################
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
28 cmake_minimum_required(VERSION 2.6)
29 project(gnuradio CXX C)
30 enable_testing()
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
31
4691e85 @michaelld cmake: make sure our local CMake Modules path comes first.
michaelld authored
32 #make sure our local CMake Modules path comes first
33 list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
015db3a @trondeau cmake: Create a cmake file to hold various project build types.
trondeau authored
34
35 include(GrBuildTypes)
1adb086 @trondeau cmake: adds a NoOptWithASM build type for building with assembly outp…
trondeau authored
36
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
37 #select the release build type by default to get optimization flags
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
38 if(NOT CMAKE_BUILD_TYPE)
39 set(CMAKE_BUILD_TYPE "Release")
40 message(STATUS "Build type not specified: defaulting to release.")
41 endif(NOT CMAKE_BUILD_TYPE)
07d01b3 @trondeau cmake: added a check for the set build type.
trondeau authored
42 GR_CHECK_BUILD_TYPE(${CMAKE_BUILD_TYPE})
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
43 set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
015db3a @trondeau cmake: Create a cmake file to hold various project build types.
trondeau authored
44 message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.")
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
45
f2ed379 @trondeau cmake: remove version.sh since we don't need it for autotools. Set ve…
trondeau authored
46 # Set the version information here
47 set(VERSION_INFO_MAJOR_VERSION 3)
61d337a @jmcorgan cmake: upgrade revision to 3.7git
jmcorgan authored
48 set(VERSION_INFO_API_COMPAT 7)
f0cd504 @jmcorgan Update revision for 3.7.7git development
jmcorgan authored
49 set(VERSION_INFO_MINOR_VERSION 7)
50 set(VERSION_INFO_MAINT_VERSION git)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
51 include(GrVersion) #setup version info
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
52
fd52df0 @trondeau build: use -O2 with cmake in Debug build.
trondeau authored
53 # Append -O2 optimization flag for Debug builds
54 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")
55 SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O2")
56
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
57 ########################################################################
52ca5e2 @osh core: added gr_tuntap_pdu, gr_socket_pdu, and msg passing enhancements
osh authored
58 # Environment setup
59 ########################################################################
60 IF(NOT DEFINED BOOST_ROOT)
61 SET(BOOST_ROOT ${CMAKE_INSTALL_PREFIX})
62 ENDIF()
63
64 ########################################################################
efaa238 @guruofquality cmake: support for importing executables when doing cross build
guruofquality authored
65 # Import executables from a native build (for cross compiling)
66 # http://www.vtk.org/Wiki/CMake_Cross_Compiling#Using_executables_in_the_build_created_during_the_build
67 ########################################################################
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
68 if(IMPORT_EXECUTABLES)
69 include(${IMPORT_EXECUTABLES})
70 endif(IMPORT_EXECUTABLES)
efaa238 @guruofquality cmake: support for importing executables when doing cross build
guruofquality authored
71
72 #set file that the native build will fill with exports
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
73 set(EXPORT_FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake)
74 file(WRITE ${EXPORT_FILE}) #blank the file (subdirs will append)
efaa238 @guruofquality cmake: support for importing executables when doing cross build
guruofquality authored
75
76 ########################################################################
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
77 # Compiler specific setup
78 ########################################################################
e341078 @guruofquality cmake: added conditional check for compiler flags
guruofquality authored
79 include(GrMiscUtils) #compiler flag check
80
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
81 if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
82 #http://gcc.gnu.org/wiki/Visibility
e341078 @guruofquality cmake: added conditional check for compiler flags
guruofquality authored
83 GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
84 endif()
85
86 if(CMAKE_COMPILER_IS_GNUCXX)
435dc71 @guruofquality uhd: cleanup some -Wall warnings
guruofquality authored
87 GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-Wsign-compare HAVE_WARN_SIGN_COMPARE)
88 GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-Wall HAVE_WARN_ALL)
8cee087 @trondeau Most of these warnings are coming from swig-generated sources. They a…
trondeau authored
89 GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-Wno-uninitialized HAVE_WARN_NO_UNINITIALIZED)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
90 endif(CMAKE_COMPILER_IS_GNUCXX)
91
92 if(MSVC)
93 include_directories(${CMAKE_SOURCE_DIR}/cmake/msvc) #missing headers
3b6ca99 @ncorgan Windows compatibility fixes
ncorgan authored
94 add_definitions(-D_WIN32_WINNT=0x0502) #Minimum version: "Windows Server 2003 with SP1, Windows XP with SP2"
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
95 add_definitions(-DNOMINMAX) #disables stupidity and enables std::min and std::max
96 add_definitions( #stop all kinds of compatibility warnings
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
97 -D_SCL_SECURE_NO_WARNINGS
98 -D_CRT_SECURE_NO_WARNINGS
99 -D_CRT_SECURE_NO_DEPRECATE
100 -D_CRT_NONSTDC_NO_DEPRECATE
101 )
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
102 add_definitions(-DHAVE_CONFIG_H)
103 add_definitions(/MP) #build with multiple processors
7d87d72 @ncorgan MSVC fixes
ncorgan authored
104 add_definitions(/bigobj) #allow for larger object files
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
105 endif(MSVC)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
106
5a16f39 @osh runtime: install compiler information volk: install compiler informat…
osh authored
107 # Record Compiler Info for record
108 STRING(TOUPPER ${CMAKE_BUILD_TYPE} GRCBTU)
109 set(COMPILER_INFO "")
1e0c15b @ncorgan Windows compatibility fixes
ncorgan authored
110 IF(MSVC)
111 IF(MSVC90) #Visual Studio 9
112 SET(cmake_c_compiler_version "Microsoft Visual Studio 9.0")
113 SET(cmake_cxx_compiler_version "Microsoft Visual Studio 9.0")
114 ELSE(MSVC10) #Visual Studio 10
115 SET(cmake_c_compiler_version "Microsoft Visual Studio 10.0")
116 SET(cmake_cxx_compiler_version "Microsoft Visual Studio 10.0")
117 ELSE(MSVC11) #Visual Studio 11
118 SET(cmake_c_compiler_version "Microsoft Visual Studio 11.0")
119 SET(cmake_cxx_compiler_version "Microsoft Visual Studio 11.0")
120 ELSE(MSVC12) #Visual Studio 12
121 SET(cmake_c_compiler_version "Microsoft Visual Studio 12.0")
122 SET(cmake_cxx_compiler_version "Microsoft Visual Studio 12.0")
123 ENDIF()
124 ELSE()
125 execute_process(COMMAND ${CMAKE_C_COMPILER} --version
126 OUTPUT_VARIABLE cmake_c_compiler_version)
127 execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
128 OUTPUT_VARIABLE cmake_cxx_compiler_version)
129 ENDIF(MSVC)
5a16f39 @osh runtime: install compiler information volk: install compiler informat…
osh authored
130 set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n" )
79085fe @trondeau cmake: adds compiler info to gnuradio-config-info and removes use of …
trondeau authored
131
132 # Convert to a C string to compile and display properly
133 string(STRIP "${cmake_c_compiler_version}" cmake_c_compiler_version)
134 string(STRIP "${cmake_cxx_compiler_version}" cmake_cxx_compiler_version)
135 string(STRIP ${COMPILER_INFO} COMPILER_INFO)
136 MESSAGE(STATUS "Compiler Version: ${cmake_c_compiler_version}")
5a16f39 @osh runtime: install compiler information volk: install compiler informat…
osh authored
137 MESSAGE(STATUS "Compiler Flags: ${COMPILER_INFO}")
79085fe @trondeau cmake: adds compiler info to gnuradio-config-info and removes use of …
trondeau authored
138 string(REPLACE "\n" " \\n" cmake_c_compiler_version ${cmake_c_compiler_version})
139 string(REPLACE "\n" " \\n" cmake_cxx_compiler_version ${cmake_cxx_compiler_version})
140 string(REPLACE "\n" " \\n" COMPILER_INFO ${COMPILER_INFO})
5a16f39 @osh runtime: install compiler information volk: install compiler informat…
osh authored
141
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
142 ########################################################################
143 # Install directories
144 ########################################################################
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
145 include(GrPlatform) #define LIB_SUFFIX
146 set(GR_RUNTIME_DIR bin)
147 set(GR_LIBRARY_DIR lib${LIB_SUFFIX})
148 set(GR_INCLUDE_DIR include)
149 set(GR_DATA_DIR share)
150 set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME})
151 set(GR_DOC_DIR ${GR_DATA_DIR}/doc)
1c95e89 @guruofquality cmake: parse the version.sh and git describe to model the m4 files
guruofquality authored
152 set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}-${DOCVER})
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
153 set(GR_CONF_DIR etc)
dd41a60 @guruofquality misc fix missing installed files/tweaks
guruofquality authored
154 set(GR_PKG_CONF_DIR ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME}/conf.d)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
155 set(GR_LIBEXEC_DIR libexec)
156 set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
157 set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
3689666 @trondeau qtgui: Adding a themes directory and install qss files there.
trondeau authored
158 set(GR_THEMES_DIR ${GR_PKG_DATA_DIR}/themes)
5d9c526 @trondeau cmake: don't put etc under /usr.
trondeau authored
159
160 # Special exception if prefix is /usr so we don't make a /usr/etc.
161 string(COMPARE EQUAL ${CMAKE_INSTALL_PREFIX} "/usr" isusr)
162 if(isusr)
163 set(SYSCONFDIR "/${GR_CONF_DIR}" CACHE PATH "System configuration directory")
164 else(isusr)
ab2e96d @jmcorgan cmake: fix to allow reconfiguring install prefix
jmcorgan authored
165 set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/${GR_CONF_DIR}" CACHE PATH "System configuration directory" FORCE)
5d9c526 @trondeau cmake: don't put etc under /usr.
trondeau authored
166 endif(isusr)
167
9b2855a @chithanh cmake: add support for SYSCONFDIR
chithanh authored
168 set(GR_PREFSDIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
169
5568d1e @trondeau cmake: Turning performance counters on at compile-time by default. St…
trondeau authored
170 OPTION(ENABLE_PERFORMANCE_COUNTERS "Enable block performance counters" ON)
8b42511 @trondeau sched: adding in perf counters to measure performance of blocks durin…
trondeau authored
171 if(ENABLE_PERFORMANCE_COUNTERS)
172 message(STATUS "ADDING PERF COUNTERS")
9297c84 @trondeau build: create and install a config.h so external projects can know wh…
trondeau authored
173 SET(GR_PERFORMANCE_COUNTERS True)
8b42511 @trondeau sched: adding in perf counters to measure performance of blocks durin…
trondeau authored
174 add_definitions(-DGR_PERFORMANCE_COUNTERS)
175 else(ENABLE_PERFORMANCE_COUNTERS)
9297c84 @trondeau build: create and install a config.h so external projects can know wh…
trondeau authored
176 SET(GR_PERFORMANCE_COUNTERS False)
8b42511 @trondeau sched: adding in perf counters to measure performance of blocks durin…
trondeau authored
177 message(STATUS "NO PERF COUNTERS")
178 endif(ENABLE_PERFORMANCE_COUNTERS)
5d9c526 @trondeau cmake: don't put etc under /usr.
trondeau authored
179
d174525 @trondeau build: better support for static libs.
trondeau authored
180 OPTION(ENABLE_STATIC_LIBS "Enable building of static libraries" OFF)
181 message(STATUS "Building Static Libraries: ${ENABLE_STATIC_LIBS}")
182
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
183 ########################################################################
184 # Variables replaced when configuring the package config files
185 ########################################################################
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
186 file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" prefix)
187 file(TO_NATIVE_PATH "\${prefix}" exec_prefix)
188 file(TO_NATIVE_PATH "\${exec_prefix}/${GR_LIBRARY_DIR}" libdir)
189 file(TO_NATIVE_PATH "\${prefix}/${GR_INCLUDE_DIR}" includedir)
9b2855a @chithanh cmake: add support for SYSCONFDIR
chithanh authored
190 file(TO_NATIVE_PATH "${SYSCONFDIR}" SYSCONFDIR)
191 file(TO_NATIVE_PATH "${GR_PREFSDIR}" GR_PREFSDIR)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
192
193 ########################################################################
0c10990 @michaelld cmake: on APPLE only, add defaults for rpath and install name info fo…
michaelld authored
194 # On Apple only, set install name and use rpath correctly, if not already set
195 ########################################################################
196 if(APPLE)
197 if(NOT CMAKE_INSTALL_NAME_DIR)
198 set(CMAKE_INSTALL_NAME_DIR
199 ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
200 PATH "Library Install Name Destination Directory" FORCE)
201 endif(NOT CMAKE_INSTALL_NAME_DIR)
202 if(NOT CMAKE_INSTALL_RPATH)
203 set(CMAKE_INSTALL_RPATH
204 ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
205 PATH "Library Install RPath" FORCE)
206 endif(NOT CMAKE_INSTALL_RPATH)
207 if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
208 set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
209 BOOL "Do Build Using Library Install RPath" FORCE)
210 endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
211 endif(APPLE)
212
213 ########################################################################
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
214 # Create uninstall target
215 ########################################################################
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
216 configure_file(
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
217 ${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
218 ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
219 @ONLY)
220
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
221 add_custom_target(uninstall
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
222 ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
223 )
224
225 ########################################################################
29abaa9 @michaelld cmake: Include GrBoost at the top level such that the correct default…
michaelld authored
226 # Setup Boost for global use (within this build)
227 ########################################################################
228 include(GrBoost)
229
230 ########################################################################
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
231 # Enable python component
232 ########################################################################
92b56aa @jolivain cmake: force detection to Python 2.x only
jolivain authored
233 find_package(PythonLibs 2)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
234 find_package(SWIG)
529ffdd @guruofquality cmake: added swig version check
guruofquality authored
235
236 if(SWIG_FOUND)
0d21949 @michaelld cmake: Add checks for SWIG versions 3.0.[34], with user-friendly mess…
michaelld authored
237 # Minimum SWIG version required is 1.3.31
529ffdd @guruofquality cmake: added swig version check
guruofquality authored
238 set(SWIG_VERSION_CHECK FALSE)
239 if("${SWIG_VERSION}" VERSION_GREATER "1.3.30")
240 set(SWIG_VERSION_CHECK TRUE)
241 endif()
242 endif(SWIG_FOUND)
243
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
244 include(GrComponent)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
245 GR_REGISTER_COMPONENT("python-support" ENABLE_PYTHON
246 PYTHONLIBS_FOUND
247 SWIG_FOUND
529ffdd @guruofquality cmake: added swig version check
guruofquality authored
248 SWIG_VERSION_CHECK
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
249 )
250
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
251 find_package(CppUnit)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
252 GR_REGISTER_COMPONENT("testing-support" ENABLE_TESTING
253 CPPUNIT_FOUND
254 )
255
256 ########################################################################
257 # Add optional dlls specified in DLL_PATHS
258 ########################################################################
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
259 foreach(path ${DLL_PATHS})
260 file(GLOB _dlls "${path}/*.dll")
261 list(APPEND ALL_DLL_FILES ${_dlls})
262 endforeach(path)
263 if(DEFINED ALL_DLL_FILES)
264 include(GrPackage)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
265 CPACK_COMPONENT("extra_dlls"
266 DISPLAY_NAME "Extra DLLs"
267 DESCRIPTION "Extra DLLs for runtime dependency requirements"
268 )
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
269 message(STATUS "")
270 message(STATUS "Including the following dlls into the install:")
271 foreach(_dll ${ALL_DLL_FILES})
272 message(STATUS " ${_dll}")
273 endforeach(_dll)
274 install(FILES ${ALL_DLL_FILES} DESTINATION ${GR_RUNTIME_DIR} COMPONENT "extra_dlls")
275 endif()
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
276
277 ########################################################################
278 # Setup volk as a subproject
279 ########################################################################
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
280 message(STATUS "")
281 message(STATUS "Configuring VOLK support...")
282
283 OPTION(ENABLE_INTERNAL_VOLK "Enable internal VOLK only" ON)
284 unset(VOLK_FOUND)
285 if(NOT ENABLE_INTERNAL_VOLK)
286 find_package(Volk)
287 if(NOT VOLK_FOUND)
288 message(STATUS " External VOLK not found; checking internal.")
289 endif()
290 endif()
4492c52 @n-west cmake: only build VOLK if it doesnt exist already
n-west authored
291 if(NOT VOLK_FOUND)
f46d7bc @n-west build: check if VOLK submodule is checked out
n-west authored
292 find_file(INTREE_VOLK_FOUND
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
293 volk/volk_common.h
294 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/volk/include
295 NO_DEFAULT_PATH
7579f97 cmake: fix finding internal Volk submodule when using oe-sdk cross to…
Sean Nowlan authored
296 NO_CMAKE_FIND_ROOT_PATH
f46d7bc @n-west build: check if VOLK submodule is checked out
n-west authored
297 )
298
299 if(NOT INTREE_VOLK_FOUND)
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
300 message(STATUS " VOLK submodule is not checked out.")
301 message(STATUS " To check out the VOLK submodule, use:")
302 message(STATUS " git pull --recurse-submodules=on")
303 message(STATUS " git submodule update")
304 if(ENABLE_INTERNAL_VOLK)
305 message(STATUS " External VOLK disabled.")
306 endif()
307 message(STATUS " Override with -DENABLE_INTERNAL_VOLK=ON/OFF")
308 message(STATUS "")
309 message(FATAL_ERROR "VOLK required but not found.")
f46d7bc @n-west build: check if VOLK submodule is checked out
n-west authored
310 endif()
311
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
312 add_subdirectory(volk)
313 # if the above command returns, then VOLK is enabled
314
4492c52 @n-west cmake: only build VOLK if it doesnt exist already
n-west authored
315 include(GrComponent)
316 GR_REGISTER_COMPONENT("volk" ENABLE_VOLK)
317
318 set(VOLK_INCLUDE_DIRS
319 ${CMAKE_CURRENT_SOURCE_DIR}/volk/include
320 ${CMAKE_CURRENT_BINARY_DIR}/volk/include
321 )
609a0cb @guruofquality cmake: tweaks + fixes for components/packaging
guruofquality authored
322
1ef31a4 @skoslowski cmake: abs path for external volk
skoslowski authored
323 set(VOLK_LIBRARIES volk)
324
4492c52 @n-west cmake: only build VOLK if it doesnt exist already
n-west authored
325 if(ENABLE_VOLK)
d6334f0 @guruofquality volk: make volk a gr component in the top level
guruofquality authored
326
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
327 include(GrPackage)
328 CPACK_SET(CPACK_COMPONENT_GROUP_VOLK_DESCRIPTION "Vector optimized library of kernels")
d6334f0 @guruofquality volk: make volk a gr component in the top level
guruofquality authored
329
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
330 CPACK_COMPONENT("volk_runtime"
331 GROUP "Volk"
332 DISPLAY_NAME "Runtime"
333 DESCRIPTION "Dynamic link libraries"
334 )
d6334f0 @guruofquality volk: make volk a gr component in the top level
guruofquality authored
335
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
336 CPACK_COMPONENT("volk_devel"
337 GROUP "Volk"
338 DISPLAY_NAME "Development"
339 DESCRIPTION "C++ headers, package config, import libraries"
340 )
609a0cb @guruofquality cmake: tweaks + fixes for components/packaging
guruofquality authored
341
4492c52 @n-west cmake: only build VOLK if it doesnt exist already
n-west authored
342 endif(ENABLE_VOLK)
343 else()
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
344 message(STATUS " An external VOLK has been found and will be used for build.")
4492c52 @n-west cmake: only build VOLK if it doesnt exist already
n-west authored
345 set(ENABLE_VOLK TRUE)
346 endif(NOT VOLK_FOUND)
d6334f0 @guruofquality volk: make volk a gr component in the top level
guruofquality authored
347
328db50 @michaelld cmake: more robust VOLK configuration, allowing for selection of inte…
michaelld authored
348 message(STATUS " Override with -DENABLE_INTERNAL_VOLK=ON/OFF")
349
d71d02d @trondeau Fixing up the gr-log capabilities.
trondeau authored
350 # Handle gr_log enable/disable
351 GR_LOGGING()
352
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
353 ########################################################################
8820891 @trondeau docs: installing README files.
trondeau authored
354 # Distribute the README file
355 ########################################################################
356 install(
357 FILES README README.hacking
358 DESTINATION ${GR_PKG_DOC_DIR}
359 COMPONENT "docs"
360 )
361
f986d38 @guruofquality fft: added gnuradio-fft dep for some tests
guruofquality authored
362 ########################################################################
363 # The following dependency libraries are needed by all gr modules:
364 ########################################################################
f74d3da @trondeau gruel: moved gruel into subdirs of gnuradio-runtime.
trondeau authored
365 list(APPEND GR_TEST_TARGET_DEPS volk gnuradio-runtime)
f986d38 @guruofquality fft: added gnuradio-fft dep for some tests
guruofquality authored
366 list(APPEND GR_TEST_PYTHON_DIRS
4c369a6 @trondeau runtime: build structure updates so ControlPort is usable in QA and o…
trondeau authored
367 ${CMAKE_BINARY_DIR}/gnuradio-runtime/python
26dceec @jmcorgan runtime: migrate remaining gnuradio-core contents into gnuradio-runtime
jmcorgan authored
368 ${CMAKE_SOURCE_DIR}/gnuradio-runtime/python
369 ${CMAKE_BINARY_DIR}/gnuradio-runtime/swig
f986d38 @guruofquality fft: added gnuradio-fft dep for some tests
guruofquality authored
370 )
8820891 @trondeau docs: installing README files.
trondeau authored
371
4c369a6 @trondeau runtime: build structure updates so ControlPort is usable in QA and o…
trondeau authored
372 # Note that above we put the binary gnuradio-runtime/python directory
373 # before the source directory. This is due to a quirk with ControlPort
374 # and how slice generates files and names. We want the QA and
375 # installed code to import the same names, so we have to grab from the
376 # binary directory first.
377
8820891 @trondeau docs: installing README files.
trondeau authored
378 ########################################################################
435dc71 @guruofquality uhd: cleanup some -Wall warnings
guruofquality authored
379 # Add subdirectories (in order of deps)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
380 ########################################################################
ba67f73 @trondeau Revert "docs: fixes issues with building docs when various components…
trondeau authored
381 add_subdirectory(docs)
26dceec @jmcorgan runtime: migrate remaining gnuradio-core contents into gnuradio-runtime
jmcorgan authored
382 add_subdirectory(gnuradio-runtime)
8d4d5c1 @guruofquality gr: reorder new components in order of dependency
guruofquality authored
383 add_subdirectory(gr-blocks)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
384 add_subdirectory(grc)
ce1213e @jmcorgan fec: add new top-level component for FEC blocks
jmcorgan authored
385 add_subdirectory(gr-fec)
d790545 @trondeau gr-fft: creates a gr-fft top-level component.
trondeau authored
386 add_subdirectory(gr-fft)
f64b971 @trondeau filter: work on creating gr-filter top-level component.
trondeau authored
387 add_subdirectory(gr-filter)
8d4d5c1 @guruofquality gr: reorder new components in order of dependency
guruofquality authored
388 add_subdirectory(gr-analog)
389 add_subdirectory(gr-digital)
31e52ec @jmcorgan dtv: wip, porting gr-atsc blocks into new gr-dtv
jmcorgan authored
390 add_subdirectory(gr-dtv)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
391 add_subdirectory(gr-atsc)
392 add_subdirectory(gr-audio)
393 add_subdirectory(gr-comedi)
908e040 @trondeau channels: adding new component gr-channels to hold channel models.
trondeau authored
394 add_subdirectory(gr-channels)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
395 add_subdirectory(gr-noaa)
396 add_subdirectory(gr-pager)
397 add_subdirectory(gr-qtgui)
398 add_subdirectory(gr-trellis)
399 add_subdirectory(gr-uhd)
f4ed279 @guruofquality utils: added cmake support for the gr-utils
guruofquality authored
400 add_subdirectory(gr-utils)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
401 add_subdirectory(gr-video-sdl)
402 add_subdirectory(gr-vocoder)
72576bd @jmcorgan fcd: cmake build work in progress
jmcorgan authored
403 add_subdirectory(gr-fcd)
f9b73b1 @jmcorgan wavelet: move wavelet blocks to new top-level component
jmcorgan authored
404 add_subdirectory(gr-wavelet)
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
405 add_subdirectory(gr-wxgui)
2cf1a30 @jmcorgan zeromq: initial surgery to add to master build
jmcorgan authored
406 add_subdirectory(gr-zeromq)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
407
84d6a90 @trondeau cmake: changing where GR_CTRLPORT is defined to properly go into conf…
trondeau authored
408 # Defining GR_CTRLPORT for gnuradio/config.h
409 if(ENABLE_GR_CTRLPORT)
410 set(GR_CTRLPORT True)
411 add_definitions(-DGR_CTRLPORT)
412 endif(ENABLE_GR_CTRLPORT)
413
e5612be @trondeau build: fixed GnuradioConfig files for OOTs to use.
trondeau authored
414 # Install our Cmake modules into $prefix/lib/cmake/gnuradio
415 # See "Package Configuration Files" on page:
416 # http://www.cmake.org/Wiki/CMake/Tutorials/Packaging
417
418 configure_file(
419 ${CMAKE_SOURCE_DIR}/cmake/Modules/GnuradioConfigVersion.cmake.in
420 ${CMAKE_BINARY_DIR}/cmake/Modules/GnuradioConfigVersion.cmake
421 @ONLY)
422
190faaa @trondeau build: moving the location of the config.h file in the build tree so …
trondeau authored
423 SET(cmake_configs
e5612be @trondeau build: fixed GnuradioConfig files for OOTs to use.
trondeau authored
424 ${CMAKE_SOURCE_DIR}/cmake/Modules/GnuradioConfig.cmake
425 ${CMAKE_BINARY_DIR}/cmake/Modules/GnuradioConfigVersion.cmake
426 )
427
d2c62b5 cmake: make install directory of GNU Radio cmakes files configurable
Jaroslav Škarvada authored
428 if(NOT CMAKE_MODULES_DIR)
43a990f @michaelld cmake: fix setting and usage of CMAKE_MODULES_DIR
michaelld authored
429 set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake)
d2c62b5 cmake: make install directory of GNU Radio cmakes files configurable
Jaroslav Škarvada authored
430 endif(NOT CMAKE_MODULES_DIR)
431
f8a1505 @trondeau build: installing all cmake files into lib/cmake/gnuradio directory.
trondeau authored
432 # Install all other cmake files into same directory
433 file(GLOB cmake_others "cmake/Modules/*.cmake")
bf93935 @trondeau cmake: improve OOT projects find the installed GNU Radio.
trondeau authored
434 list(REMOVE_ITEM cmake_others
435 "${CMAKE_SOURCE_DIR}/cmake/Modules/FindGnuradio.cmake"
436 )
f8a1505 @trondeau build: installing all cmake files into lib/cmake/gnuradio directory.
trondeau authored
437
982c5e8 @trondeau build: install our cmake modules into share/gnuradio/cmake/Modules.
trondeau authored
438 install(
f8a1505 @trondeau build: installing all cmake files into lib/cmake/gnuradio directory.
trondeau authored
439 FILES ${cmake_configs} ${cmake_others}
43a990f @michaelld cmake: fix setting and usage of CMAKE_MODULES_DIR
michaelld authored
440 DESTINATION ${CMAKE_MODULES_DIR}/gnuradio
807ef84 @jmcorgan cmake: fix packaging categories to use runtime vs. core
jmcorgan authored
441 COMPONENT "runtime_devel"
982c5e8 @trondeau build: install our cmake modules into share/gnuradio/cmake/Modules.
trondeau authored
442 )
443
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
444 #finalize cpack after subdirs processed
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
445 include(GrPackage)
accb9f2 @guruofquality gr: squashed cmakelists.txt into one commit
guruofquality authored
446 CPACK_FINALIZE()
447
448 ########################################################################
449 # Print summary
450 ########################################################################
451 GR_PRINT_COMPONENT_SUMMARY()
71c0f14 @guruofquality gr: the CMakeLists.txt took a chill pill
guruofquality authored
452 message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
1c95e89 @guruofquality cmake: parse the version.sh and git describe to model the m4 files
guruofquality authored
453 message(STATUS "Building for version: ${VERSION} / ${LIBVER}")
add507c @trondeau build: duplicating move on next of config.h creation to get all defs.
trondeau authored
454
455 # Create a config.h with some definitions to export to other projects.
456 CONFIGURE_FILE(
457 ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
190faaa @trondeau build: moving the location of the config.h file in the build tree so …
trondeau authored
458 ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime/include/gnuradio/config.h
add507c @trondeau build: duplicating move on next of config.h creation to get all defs.
trondeau authored
459 )
460
ae7fe68 @marcusmueller gnuradio-config-info: Added --enabled-components
marcusmueller authored
461 #Re-generate the constants file, now that we actually know which components will be enabled.
462 configure_file(
463 ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-runtime/lib/constants.cc.in
464 ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime/lib/constants.cc
465 ESCAPE_QUOTES
466 @ONLY)
467
add507c @trondeau build: duplicating move on next of config.h creation to get all defs.
trondeau authored
468 # Install config.h in include/gnuradio
469 install(
470 FILES
190faaa @trondeau build: moving the location of the config.h file in the build tree so …
trondeau authored
471 ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime/include/gnuradio/config.h
add507c @trondeau build: duplicating move on next of config.h creation to get all defs.
trondeau authored
472 DESTINATION ${GR_INCLUDE_DIR}/gnuradio
807ef84 @jmcorgan cmake: fix packaging categories to use runtime vs. core
jmcorgan authored
473 COMPONENT "runtime_devel"
add507c @trondeau build: duplicating move on next of config.h creation to get all defs.
trondeau authored
474 )
Something went wrong with that request. Please try again.