port build system

This commit is contained in:
Bastian Bloessl
2021-07-19 09:14:24 +02:00
parent 484f8ea48a
commit eeca8906ba
48 changed files with 12835 additions and 317 deletions
+31 -22
View File
@@ -1,21 +1,10 @@
# Copyright 2011,2012,2014,2016,2018 Free Software Foundation, Inc.
# Copyright 2011-2020 Free Software Foundation, Inc.
#
# This file is part of gr-foo
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-foo
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# SPDX-License-Identifier: GPL-3.0-or-later
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
########################################################################
# Project setup
@@ -62,11 +51,11 @@ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
endif()
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD 14)
ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD 14)
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD 14)
ELSE()
message(WARNING "C++ standard could not be set because compiler is not GNU, Clang or MSVC.")
ENDIF()
@@ -95,6 +84,7 @@ endif()
########################################################################
# Install directories
########################################################################
include(FindPkgConfig)
find_package(Gnuradio "3.9" REQUIRED COMPONENTS blocks analog filter fft)
include(GrVersion)
@@ -131,6 +121,20 @@ if(APPLE)
endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
endif(APPLE)
########################################################################
# Find gnuradio build dependencies
########################################################################
find_package(Doxygen)
########################################################################
# Setup doxygen option
########################################################################
if(DOXYGEN_FOUND)
option(ENABLE_DOXYGEN "Build docs using Doxygen" ON)
else(DOXYGEN_FOUND)
option(ENABLE_DOXYGEN "Build docs using Doxygen" OFF)
endif(DOXYGEN_FOUND)
########################################################################
# Create uninstall target
########################################################################
@@ -143,15 +147,20 @@ add_custom_target(uninstall
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
)
########################################################################
# Add subdirectories
########################################################################
add_subdirectory(include/foo)
add_subdirectory(lib)
add_subdirectory(swig)
add_subdirectory(python)
add_subdirectory(grc)
add_subdirectory(docs)
# NOTE: manually update below to use GRC to generate C++ flowgraphs w/o python
if(ENABLE_PYTHON)
message(STATUS "PYTHON and GRC components are enabled")
add_subdirectory(python)
add_subdirectory(grc)
else(ENABLE_PYTHON)
message(STATUS "PYTHON and GRC components are disabled")
endif(ENABLE_PYTHON)
########################################################################
# Install cmake search helper for this library