From ab2fb35677e38a384df3f9503d1f45f64bbc0374 Mon Sep 17 00:00:00 2001
From: Andrej Rode <mail@andrejro.de>
Date: Sat, 2 Mar 2019 19:59:00 +0100
Subject: cmake: Update to modern CMake usage

This includes using target based setting of includes
and link libraries. This will transitively add the includes
and linking flags to dependent targets.

This is still a work in progress since only the dynamic
libraries have been touched and not all of include_directories
directives are gone yet.

cmake: remove GR_INCLUDE_SUBDIRECTORY macro

Previously this macro was used to inject subdirectories in the
current CMake namespace. This is generally undesired and pollutes the
current context.

previously GNU Radio CMake had a non-default option ENABLE_STATIC_LIBS
to build both, shared libraries and static libraries.
This seems to be a construction taken over from autotools and serves
no purpuose in CMake and complicates the library building.

cmake: remove GR_LIBTOOL and la generation support

This looks like it was primarily used to support projects using
autotools, but comments state that the generated .la files aren't
compatible with autotools anyway.

cmake: Bump required CMake version to 3.8

UseSWIG cmake uses syntax which requires at least CMake 3.8 and is non-trivial
to change
---
 gr-analog/swig/CMakeLists.txt | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

(limited to 'gr-analog/swig/CMakeLists.txt')

diff --git a/gr-analog/swig/CMakeLists.txt b/gr-analog/swig/CMakeLists.txt
index 9646299098..e55e0f41ea 100644
--- a/gr-analog/swig/CMakeLists.txt
+++ b/gr-analog/swig/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2019 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -23,18 +23,8 @@
 include(GrPython)
 include(GrSwig)
 
-set(GR_SWIG_INCLUDE_DIRS
-    ${GR_BLOCKS_INCLUDE_DIRS}
-    ${GR_ANALOG_INCLUDE_DIRS}
-    ${GR_FILTER_INCLUDE_DIRS}
-    ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${VOLK_INCLUDE_DIRS}
-    ${Boost_INCLUDE_DIRS}
-)
-
-if(ENABLE_GR_CTRLPORT)
-  list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
-endif(ENABLE_GR_CTRLPORT)
+set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:runtime_swig,INCLUDE_DIRECTORIES>)
+set(GR_SWIG_TARGET_DEPS runtime_swig)
 
 set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/analog_swig_doc.i)
 set(GR_SWIG_DOC_DIRS
-- 
cgit v1.2.3