blob: 79fa57a82924c93e0c3ef38d74c3e3b9d376c03f [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
piotr7f3f3662014-07-08 16:47:53 +020025include_directories(${Boost_INCLUDE_DIR} receiver burst_printer)
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
piotr7f3f3662014-07-08 16:47:53 +020032 burst_printer/bursts_printer_impl.cc
piotrfaacc722014-07-20 23:48:32 +020033 demapping/get_bcch_or_ccch_bursts_impl.cc
34 decoding/control_channels_decoder_impl.cc
35 decoding/cch.c
36 decoding/fire_crc.c
37)
piotr437f5462014-02-04 17:57:25 +010038
39add_library(gnuradio-gsm SHARED ${gsm_sources})
piotr3f1ea812014-04-17 10:56:08 +020040target_link_libraries(gnuradio-gsm ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}
41 boost_iostreams
42 boost_system
43 boost_filesystem
44)
piotr437f5462014-02-04 17:57:25 +010045set_target_properties(gnuradio-gsm PROPERTIES DEFINE_SYMBOL "gnuradio_gsm_EXPORTS")
46
47########################################################################
48# Install built library files
49########################################################################
50install(TARGETS gnuradio-gsm
51 LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file
52 ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
53 RUNTIME DESTINATION bin # .dll file
54)
55
56########################################################################
57# Build and register unit test
58########################################################################
piotr7f3f3662014-07-08 16:47:53 +020059#include(GrTest)
piotr437f5462014-02-04 17:57:25 +010060
piotr7f3f3662014-07-08 16:47:53 +020061#include_directories(${CPPUNIT_INCLUDE_DIRS})
piotr437f5462014-02-04 17:57:25 +010062
piotr7f3f3662014-07-08 16:47:53 +020063#list(APPEND test_gsm_sources
64# ${CMAKE_CURRENT_SOURCE_DIR}/test_gsm.cc
65# ${CMAKE_CURRENT_SOURCE_DIR}/qa_gsm.cc
66# ${CMAKE_CURRENT_SOURCE_DIR}/qa_receiver.cc
67#)
piotr437f5462014-02-04 17:57:25 +010068
piotr7f3f3662014-07-08 16:47:53 +020069#add_executable(test-gsm ${test_gsm_sources})
piotr437f5462014-02-04 17:57:25 +010070
piotr7f3f3662014-07-08 16:47:53 +020071#target_link_libraries(
72# test-gsm
73# ${GNURADIO_RUNTIME_LIBRARIES}
74# ${Boost_LIBRARIES}
75# ${CPPUNIT_LIBRARIES}
76# gnuradio-gsm
77#)
piotr437f5462014-02-04 17:57:25 +010078
piotr7f3f3662014-07-08 16:47:53 +020079#GR_ADD_TEST(test_gsm test-gsm)