|
| 1 | +# Copyright 2012 Free Software Foundation, Inc. |
| 2 | +# |
| 3 | +# This file is part of GNU Radio |
| 4 | +# |
| 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. |
| 9 | +# |
| 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. |
| 14 | +# |
| 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 | +######################################################################## |
| 21 | +# Setup dependencies |
| 22 | +######################################################################## |
| 23 | +include(GrBoost) |
| 24 | + |
| 25 | +######################################################################## |
| 26 | +# Register component |
| 27 | +######################################################################## |
| 28 | +include(GrComponent) |
| 29 | + |
| 30 | +GR_REGISTER_COMPONENT("gr-filter" ENABLE_GR_FILTER |
| 31 | + ENABLE_GRUEL |
| 32 | + ENABLE_VOLK |
| 33 | + Boost_FOUND |
| 34 | + ENABLE_GR_CORE |
| 35 | + ENABLE_GR_FFT |
| 36 | +) |
| 37 | + |
| 38 | +GR_SET_GLOBAL(FILTER_INCLUDE_DIRS |
| 39 | + ${CMAKE_CURRENT_SOURCE_DIR}/lib |
| 40 | + ${CMAKE_CURRENT_SOURCE_DIR}/include |
| 41 | +) |
| 42 | + |
| 43 | +######################################################################## |
| 44 | +# Begin conditional configuration |
| 45 | +######################################################################## |
| 46 | +if(ENABLE_GR_FILTER) |
| 47 | + |
| 48 | +######################################################################## |
| 49 | +# Setup CPack components |
| 50 | +######################################################################## |
| 51 | +include(GrPackage) |
| 52 | +CPACK_SET(CPACK_COMPONENT_GROUP_FILTER_DESCRIPTION "GNU Radio Filter Blocks") |
| 53 | + |
| 54 | +CPACK_COMPONENT("filter_runtime" |
| 55 | + GROUP "Filter" |
| 56 | + DISPLAY_NAME "Runtime" |
| 57 | + DESCRIPTION "Runtime" |
| 58 | + DEPENDS "core_runtime" |
| 59 | +) |
| 60 | + |
| 61 | +CPACK_COMPONENT("filter_devel" |
| 62 | + GROUP "Filter" |
| 63 | + DISPLAY_NAME "Development" |
| 64 | + DESCRIPTION "C++ headers, package config, import libraries" |
| 65 | + DEPENDS "core_devel" |
| 66 | +) |
| 67 | + |
| 68 | +CPACK_COMPONENT("filter_python" |
| 69 | + GROUP "Filter" |
| 70 | + DISPLAY_NAME "Python" |
| 71 | + DESCRIPTION "Python modules for runtime; GRC xml files" |
| 72 | + DEPENDS "core_python;filter_runtime" |
| 73 | +) |
| 74 | + |
| 75 | +CPACK_COMPONENT("filter_swig" |
| 76 | + GROUP "Filter" |
| 77 | + DISPLAY_NAME "SWIG" |
| 78 | + DESCRIPTION "SWIG development .i files" |
| 79 | + DEPENDS "core_swig;filter_python;filter_devel" |
| 80 | +) |
| 81 | + |
| 82 | +######################################################################## |
| 83 | +# Add subdirectories |
| 84 | +######################################################################## |
| 85 | +add_subdirectory(include/filter) |
| 86 | +add_subdirectory(lib) |
| 87 | +if(ENABLE_PYTHON) |
| 88 | + add_subdirectory(swig) |
| 89 | + add_subdirectory(python) |
| 90 | + add_subdirectory(grc) |
| 91 | +endif(ENABLE_PYTHON) |
| 92 | +#add_subdirectory(examples) |
| 93 | +add_subdirectory(doc) |
| 94 | + |
| 95 | +######################################################################## |
| 96 | +# Create Pkg Config File |
| 97 | +######################################################################## |
| 98 | +configure_file( |
| 99 | + ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-filter.pc.in |
| 100 | + ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-filter.pc |
| 101 | +@ONLY) |
| 102 | + |
| 103 | +install( |
| 104 | + FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-filter.pc |
| 105 | + DESTINATION ${GR_LIBRARY_DIR}/pkgconfig |
| 106 | + COMPONENT "filter_devel" |
| 107 | +) |
| 108 | + |
| 109 | +endif(ENABLE_GR_FILTER) |
0 commit comments