blob: 38539da9668632ceb568b31e7edd5af4b04b5996 [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
25include_directories(${Boost_INCLUDE_DIR})
26link_directories(${Boost_LIBRARY_DIRS})
27
28list(APPEND gsm_sources
29 receiver_impl.cc
30 receiver_config.cc
31 viterbi_detector.cc
32 sch.c
piotr7c82b172014-02-08 14:15:27 +010033 bursts_printer_impl.cc
piotrd77c9cf2014-04-17 11:09:30 +020034 get_ccch_bursts_impl.cc
piotr437f5462014-02-04 17:57:25 +010035)
36
37add_library(gnuradio-gsm SHARED ${gsm_sources})
piotr3f1ea812014-04-17 10:56:08 +020038target_link_libraries(gnuradio-gsm ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES}
39 boost_iostreams
40 boost_system
41 boost_filesystem
42)
piotr437f5462014-02-04 17:57:25 +010043set_target_properties(gnuradio-gsm PROPERTIES DEFINE_SYMBOL "gnuradio_gsm_EXPORTS")
44
45########################################################################
46# Install built library files
47########################################################################
48install(TARGETS gnuradio-gsm
49 LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file
50 ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
51 RUNTIME DESTINATION bin # .dll file
52)
53
54########################################################################
55# Build and register unit test
56########################################################################
57include(GrTest)
58
59include_directories(${CPPUNIT_INCLUDE_DIRS})
60
61list(APPEND test_gsm_sources
62 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsm.cc
63 ${CMAKE_CURRENT_SOURCE_DIR}/qa_gsm.cc
64 ${CMAKE_CURRENT_SOURCE_DIR}/qa_receiver.cc
65)
66
67add_executable(test-gsm ${test_gsm_sources})
68
69target_link_libraries(
70 test-gsm
71 ${GNURADIO_RUNTIME_LIBRARIES}
72 ${Boost_LIBRARIES}
73 ${CPPUNIT_LIBRARIES}
74 gnuradio-gsm
75)
76
77GR_ADD_TEST(test_gsm test-gsm)