~ubuntu-branches/ubuntu/trusty/gnuradio/trusty-updates

« back to all changes in this revision

Viewing changes to gnuradio-core/src/lib/viterbi/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): A. Maitland Bottoms
  • Date: 2012-02-26 21:26:16 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120226212616-vsfkbi1158xshdql
Tags: 3.5.1-1
* new upstream version, re-packaged from scratch with modern tools
    closes: #642716, #645332, #394849, #616832, #590048, #642580,
    #647018, #557050, #559640, #631863
* CMake build

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2010-2011 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
# This file included, use CMake directory variables
 
22
########################################################################
 
23
 
 
24
set(viterbi_sources
 
25
    ${CMAKE_CURRENT_SOURCE_DIR}/metrics.c
 
26
    ${CMAKE_CURRENT_SOURCE_DIR}/tab.c
 
27
    ${CMAKE_CURRENT_SOURCE_DIR}/viterbi.c
 
28
)
 
29
 
 
30
########################################################################
 
31
# define missing erf function with C linkage (hack for metrics.c)
 
32
########################################################################
 
33
if(MSVC)
 
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);
 
38
}
 
39
")
 
40
list(APPEND viterbi_sources ${CMAKE_CURRENT_BINARY_DIR}/boost_math_erf.cc)
 
41
endif(MSVC)
 
42
 
 
43
########################################################################
 
44
# Append gnuradio-core library sources
 
45
########################################################################
 
46
list(APPEND gnuradio_core_sources ${viterbi_sources})
 
47
 
 
48
########################################################################
 
49
# Install runtime headers
 
50
########################################################################
 
51
install(
 
52
    FILES ${CMAKE_CURRENT_SOURCE_DIR}/viterbi.h
 
53
    DESTINATION ${GR_INCLUDE_DIR}/gnuradio
 
54
    COMPONENT "core_devel"
 
55
)
 
56
 
 
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})