root / gnuradio-core / src / lib / general / CMakeLists.txt @ 0cbaf1b3
History | View | Annotate | Download (10.3 kB)
| 1 | # Copyright 2010-2011 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 | # This file included, use CMake directory variables |
| 22 | ######################################################################## |
| 23 | |
| 24 | ######################################################################## |
| 25 | # Handle the generated sine table |
| 26 | ######################################################################## |
| 27 | add_custom_command( |
| 28 | OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sine_table.h
|
| 29 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen_sine_table.py
|
| 30 | COMMAND ${PYTHON_EXECUTABLE}
|
| 31 | ${CMAKE_CURRENT_SOURCE_DIR}/gen_sine_table.py >
|
| 32 | ${CMAKE_CURRENT_BINARY_DIR}/sine_table.h
|
| 33 | ) |
| 34 | |
| 35 | include(AddFileDependencies) |
| 36 | ADD_FILE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt.cc
|
| 37 | ${CMAKE_CURRENT_BINARY_DIR}/sine_table.h
|
| 38 | ) |
| 39 | |
| 40 | ######################################################################## |
| 41 | # Handle the generated constants |
| 42 | ######################################################################## |
| 43 | execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
|
| 44 | "import time;print time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime())"
|
| 45 | OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE |
| 46 | ) |
| 47 | message(STATUS "Loading build date ${BUILD_DATE} into gr_constants...")
|
| 48 | |
| 49 | message(STATUS "Loading version ${VERSION} into gr_constants...")
|
| 50 | |
| 51 | file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}/${GR_CONF_DIR}" SYSCONFDIR)
|
| 52 | file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}/${GR_PKG_CONF_DIR}" GR_PREFSDIR)
|
| 53 | |
| 54 | #double escape for windows backslash path separators |
| 55 | string(REPLACE "\\" "\\\\" prefix ${prefix})
|
| 56 | string(REPLACE "\\" "\\\\" SYSCONFDIR ${SYSCONFDIR})
|
| 57 | string(REPLACE "\\" "\\\\" GR_PREFSDIR ${GR_PREFSDIR})
|
| 58 | |
| 59 | configure_file( |
| 60 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_constants.cc.in
|
| 61 | ${CMAKE_CURRENT_BINARY_DIR}/gr_constants.cc
|
| 62 | @ONLY) |
| 63 | |
| 64 | list(APPEND gnuradio_core_sources ${CMAKE_CURRENT_BINARY_DIR}/gr_constants.cc)
|
| 65 | |
| 66 | ######################################################################## |
| 67 | # Append gnuradio-core library sources |
| 68 | ######################################################################## |
| 69 | list(APPEND gnuradio_core_sources |
| 70 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_circular_file.cc
|
| 71 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_count_bits.cc
|
| 72 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_fast_atan2f.cc
|
| 73 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_fft_vcc_fftw.cc
|
| 74 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt.cc
|
| 75 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_misc.cc
|
| 76 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_random.cc
|
| 77 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_reverse.cc
|
| 78 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_add_const_ss_generic.cc
|
| 79 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_char_to_float.cc
|
| 80 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_control_loop.cc
|
| 81 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_debugger_hook.cc
|
| 82 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_fft.cc
|
| 83 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_char.cc
|
| 84 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_int.cc
|
| 85 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_short.cc
|
| 86 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_uchar.cc
|
| 87 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_glfsr.cc
|
| 88 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_interleaved_short_to_complex.cc
|
| 89 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_int_to_float.cc
|
| 90 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_short_to_float.cc
|
| 91 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_uchar_to_float.cc
|
| 92 | ${CMAKE_CURRENT_SOURCE_DIR}/malloc16.c
|
| 93 | ) |
| 94 | |
| 95 | ######################################################################## |
| 96 | # Append gnuradio-core test sources |
| 97 | ######################################################################## |
| 98 | list(APPEND test_gnuradio_core_sources |
| 99 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_general.cc
|
| 100 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_circular_file.cc
|
| 101 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_cpm.cc
|
| 102 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_firdes.cc
|
| 103 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fxpt.cc
|
| 104 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fxpt_nco.cc
|
| 105 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fxpt_vco.cc
|
| 106 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_math.cc
|
| 107 | ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_lfsr.cc
|
| 108 | ) |
| 109 | |
| 110 | ######################################################################## |
| 111 | # Install runtime headers |
| 112 | ######################################################################## |
| 113 | install(FILES |
| 114 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_core_api.h
|
| 115 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_circular_file.h
|
| 116 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_constants.h
|
| 117 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_count_bits.h
|
| 118 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_expj.h
|
| 119 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_fft_vcc_fftw.h
|
| 120 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt.h
|
| 121 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt_nco.h
|
| 122 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt_vco.h
|
| 123 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_log2_const.h
|
| 124 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_math.h
|
| 125 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_misc.h
|
| 126 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_nco.h
|
| 127 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_random.h
|
| 128 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_reverse.h
|
| 129 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_simple_framer_sync.h
|
| 130 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_test_types.h
|
| 131 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_vco.h
|
| 132 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_add_const_ss.h
|
| 133 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc_cc.h
|
| 134 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc_ff.h
|
| 135 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc2_cc.h
|
| 136 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc2_ff.h
|
| 137 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_char_to_float.h
|
| 138 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_control_loop.h
|
| 139 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_debugger_hook.h
|
| 140 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_fft.h
|
| 141 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_char.h
|
| 142 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_int.h
|
| 143 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_short.h
|
| 144 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_uchar.h
|
| 145 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr.h
|
| 146 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_glfsr.h
|
| 147 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_interleaved_short_to_complex.h
|
| 148 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr_15_1_0.h
|
| 149 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr_32k.h
|
| 150 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_int_to_float.h
|
| 151 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_short_to_float.h
|
| 152 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_uchar_to_float.h
|
| 153 | ${CMAKE_CURRENT_SOURCE_DIR}/malloc16.h
|
| 154 | ${CMAKE_CURRENT_SOURCE_DIR}/random.h
|
| 155 | DESTINATION ${GR_INCLUDE_DIR}/gnuradio
|
| 156 | COMPONENT "core_devel" |
| 157 | ) |
| 158 | |
| 159 | ######################################################################## |
| 160 | # Install swig headers |
| 161 | ######################################################################## |
| 162 | if(ENABLE_PYTHON) |
| 163 | install(FILES |
| 164 | ${CMAKE_CURRENT_SOURCE_DIR}/general.i
|
| 165 | ${CMAKE_CURRENT_SOURCE_DIR}/gr_constants.i
|
| 166 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc_cc.i
|
| 167 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc_ff.i
|
| 168 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc2_cc.i
|
| 169 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_agc2_ff.i
|
| 170 | ${CMAKE_CURRENT_SOURCE_DIR}/gri_control_loop.i
|
| 171 | DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
|
| 172 | COMPONENT "core_swig" |
| 173 | ) |
| 174 | endif(ENABLE_PYTHON) |
| 175 | |
| 176 | ######################################################################## |
| 177 | # Handle triple-threat files that have cc, h, and i |
| 178 | ######################################################################## |
| 179 | set(gr_core_general_triple_threats |
| 180 | complex_vec_test |
| 181 | gr_additive_scrambler_bb |
| 182 | gr_agc_cc |
| 183 | gr_agc_ff |
| 184 | gr_agc2_cc |
| 185 | gr_agc2_ff |
| 186 | gr_align_on_samplenumbers_ss |
| 187 | gr_bin_statistics_f |
| 188 | gr_bytes_to_syms |
| 189 | gr_char_to_float |
| 190 | gr_check_counting_s |
| 191 | gr_check_lfsr_32k_s |
| 192 | gr_complex_to_interleaved_short |
| 193 | gr_complex_to_xxx |
| 194 | gr_conjugate_cc |
| 195 | gr_copy |
| 196 | gr_cpfsk_bc |
| 197 | gr_cpm |
| 198 | gr_ctcss_squelch_ff |
| 199 | gr_decode_ccsds_27_fb |
| 200 | gr_diff_decoder_bb |
| 201 | gr_diff_encoder_bb |
| 202 | gr_diff_phasor_cc |
| 203 | gr_dpll_bb |
| 204 | gr_deinterleave |
| 205 | gr_delay |
| 206 | gr_encode_ccsds_27_bb |
| 207 | gr_fake_channel_coder_pp |
| 208 | gr_feedforward_agc_cc |
| 209 | gr_feval |
| 210 | gr_fft_vcc |
| 211 | gr_fft_vfc |
| 212 | gr_firdes |
| 213 | gr_float_to_char |
| 214 | gr_float_to_complex |
| 215 | gr_float_to_int |
| 216 | gr_float_to_short |
| 217 | gr_float_to_uchar |
| 218 | gr_fmdet_cf |
| 219 | gr_frequency_modulator_fc |
| 220 | gr_framer_sink_1 |
| 221 | gr_glfsr_source_b |
| 222 | gr_glfsr_source_f |
| 223 | gr_head |
| 224 | gr_int_to_float |
| 225 | gr_interleave |
| 226 | gr_interleaved_short_to_complex |
| 227 | gr_iqcomp_cc |
| 228 | gr_keep_one_in_n |
| 229 | gr_kludge_copy |
| 230 | gr_lfsr_32k_source_s |
| 231 | gr_map_bb |
| 232 | gr_nlog10_ff |
| 233 | gr_nop |
| 234 | gr_null_sink |
| 235 | gr_null_source |
| 236 | gr_pa_2x2_phase_combiner |
| 237 | gr_packet_sink |
| 238 | gr_peak_detector2_fb |
| 239 | gr_phase_modulator_fc |
| 240 | gr_pll_carriertracking_cc |
| 241 | gr_pll_freqdet_cf |
| 242 | gr_pll_refout_cc |
| 243 | gr_pn_correlator_cc |
| 244 | gr_prefs |
| 245 | gr_probe_avg_mag_sqrd_c |
| 246 | gr_probe_avg_mag_sqrd_cf |
| 247 | gr_probe_avg_mag_sqrd_f |
| 248 | gr_pwr_squelch_cc |
| 249 | gr_pwr_squelch_ff |
| 250 | gr_quadrature_demod_cf |
| 251 | gr_rail_ff |
| 252 | gr_regenerate_bb |
| 253 | gr_remez |
| 254 | gr_rms_cf |
| 255 | gr_rms_ff |
| 256 | gr_repeat |
| 257 | gr_short_to_float |
| 258 | gr_simple_correlator |
| 259 | gr_simple_framer |
| 260 | gr_simple_squelch_cc |
| 261 | gr_skiphead |
| 262 | gr_squash_ff |
| 263 | gr_squelch_base_cc |
| 264 | gr_squelch_base_ff |
| 265 | gr_stream_mux |
| 266 | gr_stream_to_streams |
| 267 | gr_stream_to_vector |
| 268 | gr_streams_to_stream |
| 269 | gr_streams_to_vector |
| 270 | gr_stretch_ff |
| 271 | gr_test |
| 272 | gr_threshold_ff |
| 273 | gr_throttle |
| 274 | gr_transcendental |
| 275 | gr_uchar_to_float |
| 276 | gr_vco_f |
| 277 | gr_vector_to_stream |
| 278 | gr_vector_to_streams |
| 279 | gr_unpack_k_bits_bb |
| 280 | gr_wavelet_ff |
| 281 | gr_wvps_ff |
| 282 | gr_descrambler_bb |
| 283 | gr_scrambler_bb |
| 284 | gr_probe_mpsk_snr_c |
| 285 | gr_probe_density_b |
| 286 | gr_annotator_alltoall |
| 287 | gr_annotator_1to1 |
| 288 | gr_burst_tagger |
| 289 | gr_correlate_access_code_tag_bb |
| 290 | ) |
| 291 | |
| 292 | foreach(file_tt ${gr_core_general_triple_threats})
|
| 293 | list(APPEND gnuradio_core_sources ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.cc)
|
| 294 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio COMPONENT "core_devel")
|
| 295 | if(ENABLE_PYTHON) |
| 296 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file_tt}.i DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig COMPONENT "core_swig")
|
| 297 | endif(ENABLE_PYTHON) |
| 298 | endforeach(file_tt ${gr_core_general_triple_threats})
|