blob: d4f04d8fd742367e2a2d1d16b57f4586b4edfdc3 [file] [log] [blame]
piotr437f5462014-02-04 17:57:25 +01001# 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########################################################################
23include(GrPlatform) #define LIB_SUFFIX
24
ptrkrysik18b631e2014-12-15 09:09:18 +010025include_directories(${Boost_INCLUDE_DIR} receiver)
piotr437f5462014-02-04 17:57:25 +010026link_directories(${Boost_LIBRARY_DIRS})
piotr437f5462014-02-04 17:57:25 +010027list(APPEND gsm_sources
piotr7f3f3662014-07-08 16:47:53 +020028 receiver/receiver_impl.cc
29 receiver/receiver_config.cc
piotr501c51e2014-07-08 23:24:07 +020030 receiver/viterbi_detector.cc
31 receiver/sch.c
piotrc00ce9c2014-08-04 11:21:24 +020032 misc_utils/bursts_printer_impl.cc
piotrdda22272014-08-04 11:31:54 +020033 misc_utils/extract_system_info_impl.cc
ptrkrysik6dded652014-11-19 11:32:05 +010034 demapping/universal_ctrl_chans_demapper_impl.cc
piotrfaacc722014-07-20 23:48:32 +020035 demapping/get_bcch_or_ccch_bursts_impl.cc
36 decoding/control_channels_decoder_impl.cc
37 decoding/cch.c
38 decoding/fire_crc.c
piotr4089c1a2014-08-06 14:10:56 +020039 misc_utils/controlled_rotator_cc_impl.cc
40 misc_utils/controlled_const_source_f_impl.cc
41 misc_utils/message_printer_impl.cc
ptrkrysik18b631e2014-12-15 09:09:18 +010042 decryption/decryption_impl.cc
piotrfaacc722014-07-20 23:48:32 +020043)
piotr437f5462014-02-04 17:57:25 +010044
45add_library(gnuradio-gsm SHARED ${gsm_sources})
ptrkrysikaea7f342014-12-03 00:37:57 +010046target_link_libraries(gnuradio-gsm ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES}
ptrkrysik30f39452014-12-05 18:25:58 +010047# libraries required by plotting.h - have troubles to be installed by pybombs
48# boost_iostreams
49# boost_system
50# boost_filesystem
piotr3f1ea812014-04-17 10:56:08 +020051)
piotr437f5462014-02-04 17:57:25 +010052set_target_properties(gnuradio-gsm PROPERTIES DEFINE_SYMBOL "gnuradio_gsm_EXPORTS")
53
54########################################################################
55# Install built library files
56########################################################################
57install(TARGETS gnuradio-gsm
58 LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file
59 ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
60 RUNTIME DESTINATION bin # .dll file
61)
62
63########################################################################
64# Build and register unit test
65########################################################################
piotr7f3f3662014-07-08 16:47:53 +020066#include(GrTest)
piotr437f5462014-02-04 17:57:25 +010067
piotr7f3f3662014-07-08 16:47:53 +020068#include_directories(${CPPUNIT_INCLUDE_DIRS})
piotr437f5462014-02-04 17:57:25 +010069
piotr7f3f3662014-07-08 16:47:53 +020070#list(APPEND test_gsm_sources
71# ${CMAKE_CURRENT_SOURCE_DIR}/test_gsm.cc
72# ${CMAKE_CURRENT_SOURCE_DIR}/qa_gsm.cc
73# ${CMAKE_CURRENT_SOURCE_DIR}/qa_receiver.cc
74#)
piotr437f5462014-02-04 17:57:25 +010075
piotr7f3f3662014-07-08 16:47:53 +020076#add_executable(test-gsm ${test_gsm_sources})
piotr437f5462014-02-04 17:57:25 +010077
piotr7f3f3662014-07-08 16:47:53 +020078#target_link_libraries(
79# test-gsm
80# ${GNURADIO_RUNTIME_LIBRARIES}
81# ${Boost_LIBRARIES}
82# ${CPPUNIT_LIBRARIES}
83# gnuradio-gsm
84#)
piotr437f5462014-02-04 17:57:25 +010085
piotr7f3f3662014-07-08 16:47:53 +020086#GR_ADD_TEST(test_gsm test-gsm)