1
# Copyright 2010-2011 Free Software Foundation, Inc.
3
# This file is part of GNU Radio
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)
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.
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.
20
########################################################################
21
# This file included, use CMake directory variables
22
########################################################################
25
${CMAKE_CURRENT_SOURCE_DIR}/metrics.c
26
${CMAKE_CURRENT_SOURCE_DIR}/tab.c
27
${CMAKE_CURRENT_SOURCE_DIR}/viterbi.c
30
########################################################################
31
# define missing erf function with C linkage (hack for metrics.c)
32
########################################################################
34
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/boost_math_erf.cc "
35
#include <boost/math/special_functions/erf.hpp>
36
extern \"C\" double erf(double x){
37
return boost::math::erf(x);
40
list(APPEND viterbi_sources ${CMAKE_CURRENT_BINARY_DIR}/boost_math_erf.cc)
43
########################################################################
44
# Append gnuradio-core library sources
45
########################################################################
46
list(APPEND gnuradio_core_sources ${viterbi_sources})
48
########################################################################
49
# Install runtime headers
50
########################################################################
52
FILES ${CMAKE_CURRENT_SOURCE_DIR}/viterbi.h
53
DESTINATION ${GR_INCLUDE_DIR}/gnuradio
54
COMPONENT "core_devel"
57
########################################################################
58
# Create some text executables (not registered tests)
59
# Its not much to build so the sources are just re-listed,
60
# rather than create a new library just for these two apps.
61
########################################################################
62
#ADD_EXECUTABLE(viterbi_encode ${CMAKE_CURRENT_SOURCE_DIR}/encode.cc ${viterbi_sources})
63
#ADD_EXECUTABLE(viterbi_decode ${CMAKE_CURRENT_SOURCE_DIR}/decode.cc ${viterbi_sources})