piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 1 | # Copyright 2011,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 library |
| 22 | ######################################################################## |
| 23 | include(GrPlatform) #define LIB_SUFFIX |
| 24 | |
piotr | 7f3f366 | 2014-07-08 16:47:53 +0200 | [diff] [blame] | 25 | include_directories(${Boost_INCLUDE_DIR} receiver burst_printer) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 26 | link_directories(${Boost_LIBRARY_DIRS}) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 27 | list(APPEND gsm_sources |
piotr | 7f3f366 | 2014-07-08 16:47:53 +0200 | [diff] [blame] | 28 | receiver/receiver_impl.cc |
| 29 | receiver/receiver_config.cc |
piotr | 501c51e | 2014-07-08 23:24:07 +0200 | [diff] [blame] | 30 | receiver/viterbi_detector.cc |
| 31 | receiver/sch.c |
piotr | c00ce9c | 2014-08-04 11:21:24 +0200 | [diff] [blame] | 32 | misc_utils/bursts_printer_impl.cc |
piotr | dda2227 | 2014-08-04 11:31:54 +0200 | [diff] [blame] | 33 | misc_utils/extract_system_info_impl.cc |
piotr | faacc72 | 2014-07-20 23:48:32 +0200 | [diff] [blame] | 34 | demapping/get_bcch_or_ccch_bursts_impl.cc |
| 35 | decoding/control_channels_decoder_impl.cc |
| 36 | decoding/cch.c |
| 37 | decoding/fire_crc.c |
piotr | 4089c1a | 2014-08-06 14:10:56 +0200 | [diff] [blame] | 38 | misc_utils/controlled_rotator_cc_impl.cc |
| 39 | misc_utils/controlled_const_source_f_impl.cc |
| 40 | misc_utils/message_printer_impl.cc |
piotr | faacc72 | 2014-07-20 23:48:32 +0200 | [diff] [blame] | 41 | ) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 42 | |
| 43 | add_library(gnuradio-gsm SHARED ${gsm_sources}) |
piotr | 3f1ea81 | 2014-04-17 10:56:08 +0200 | [diff] [blame] | 44 | target_link_libraries(gnuradio-gsm ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} |
| 45 | boost_iostreams |
| 46 | boost_system |
| 47 | boost_filesystem |
| 48 | ) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 49 | set_target_properties(gnuradio-gsm PROPERTIES DEFINE_SYMBOL "gnuradio_gsm_EXPORTS") |
| 50 | |
| 51 | ######################################################################## |
| 52 | # Install built library files |
| 53 | ######################################################################## |
| 54 | install(TARGETS gnuradio-gsm |
| 55 | LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file |
| 56 | ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file |
| 57 | RUNTIME DESTINATION bin # .dll file |
| 58 | ) |
| 59 | |
| 60 | ######################################################################## |
| 61 | # Build and register unit test |
| 62 | ######################################################################## |
piotr | 7f3f366 | 2014-07-08 16:47:53 +0200 | [diff] [blame] | 63 | #include(GrTest) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 64 | |
piotr | 7f3f366 | 2014-07-08 16:47:53 +0200 | [diff] [blame] | 65 | #include_directories(${CPPUNIT_INCLUDE_DIRS}) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 66 | |
piotr | 7f3f366 | 2014-07-08 16:47:53 +0200 | [diff] [blame] | 67 | #list(APPEND test_gsm_sources |
| 68 | # ${CMAKE_CURRENT_SOURCE_DIR}/test_gsm.cc |
| 69 | # ${CMAKE_CURRENT_SOURCE_DIR}/qa_gsm.cc |
| 70 | # ${CMAKE_CURRENT_SOURCE_DIR}/qa_receiver.cc |
| 71 | #) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 72 | |
piotr | 7f3f366 | 2014-07-08 16:47:53 +0200 | [diff] [blame] | 73 | #add_executable(test-gsm ${test_gsm_sources}) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 74 | |
piotr | 7f3f366 | 2014-07-08 16:47:53 +0200 | [diff] [blame] | 75 | #target_link_libraries( |
| 76 | # test-gsm |
| 77 | # ${GNURADIO_RUNTIME_LIBRARIES} |
| 78 | # ${Boost_LIBRARIES} |
| 79 | # ${CPPUNIT_LIBRARIES} |
| 80 | # gnuradio-gsm |
| 81 | #) |
piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 82 | |
piotr | 7f3f366 | 2014-07-08 16:47:53 +0200 | [diff] [blame] | 83 | #GR_ADD_TEST(test_gsm test-gsm) |