diff --git a/drivers/gr-dbfcttc/CMakeLists.txt b/drivers/gr-dbfcttc/CMakeLists.txt
index e642703c7..2fd7bc25a 100644
--- a/drivers/gr-dbfcttc/CMakeLists.txt
+++ b/drivers/gr-dbfcttc/CMakeLists.txt
@@ -1,21 +1,20 @@
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors)
#
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
#
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# the Free Software Foundation, either version 3 of the License, or
+# at your option) any later version.
#
-# GNU Radio is distributed in the hope that it will be useful,
+# GNSS-SDR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
+# along with GNSS-SDR. If not, see .
+#
########################################################################
@@ -84,13 +83,12 @@ endif()
# PCAP_LIBRARY The libpcap library (possibly includes a thread
# library e.g. required by pf_ring's libpcap)
# HAVE_PF_RING If a found version of libpcap supports PF_RING
-
find_package(PCAP)
if(NOT PCAP_FOUND)
message(FATAL_ERROR "PCAP required to compile dbfcttc")
endif()
+get_filename_component(PCAP_LIBRARY_DIRS ${PCAP_LIBRARY} DIRECTORY CACHE)
-message(PCAP_INCLUDE_DIR ${PCAP_INCLUDE_DIR} PCAP_LIBRARY ${PCAP_LIBRARY})
########################################################################
# Install directories
@@ -112,22 +110,13 @@ set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
########################################################################
# Find gnuradio build dependencies
########################################################################
-#find_package(GnuradioRuntime)
set(GR_REQUIRED_COMPONENTS RUNTIME PMT)
find_package(Gnuradio)
-find_package(CppUnit)
-
-# To run a more advanced search for GNU Radio and it's components and
-# versions, use the following. Add any components required to the list
-# of GR_REQUIRED_COMPONENTS (in all caps) and change "version" to the
-# minimum API compatible version required.
-#
-# set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS FILTER ...)
-# find_package(Gnuradio "version")
-
if(NOT GNURADIO_RUNTIME_FOUND)
message(FATAL_ERROR "GnuRadio Runtime required to compile dbfcttc")
endif()
+
+find_package(CppUnit)
if(NOT CPPUNIT_FOUND)
message(FATAL_ERROR "CppUnit required to compile dbfcttc")
endif()
@@ -146,7 +135,7 @@ include_directories(
)
link_directories(
- ${PCAP_LIBRARIES}
+ ${PCAP_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS}
${CPPUNIT_LIBRARY_DIRS}
${GNURADIO_RUNTIME_LIBRARY_DIRS}
@@ -171,6 +160,18 @@ add_custom_target(uninstall
########################################################################
# Add subdirectories
########################################################################
+
+# Workaround for Mac OS X
+if(APPLE)
+ # Detecting Macports with hardcoded locations...
+ if(EXISTS /opt/local/bin/python)
+ if(EXISTS /opt/local/bin/gnuradio-companion)
+ set(PYTHON_EXECUTABLE "/opt/local/bin/python" )
+ set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
+ endif(EXISTS /opt/local/bin/gnuradio-companion)
+ endif(EXISTS /opt/local/bin/python)
+endif(APPLE)
+
add_subdirectory(include/dbfcttc)
add_subdirectory(lib)
add_subdirectory(swig)
diff --git a/drivers/gr-dbfcttc/grc/CMakeLists.txt b/drivers/gr-dbfcttc/grc/CMakeLists.txt
index 2c851d0f8..b622e522c 100644
--- a/drivers/gr-dbfcttc/grc/CMakeLists.txt
+++ b/drivers/gr-dbfcttc/grc/CMakeLists.txt
@@ -1,21 +1,21 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors)
#
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
#
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# the Free Software Foundation, either version 3 of the License, or
+# at your option) any later version.
#
-# GNU Radio is distributed in the hope that it will be useful,
+# GNSS-SDR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
+# along with GNSS-SDR. If not, see .
+#
+
install(FILES
dbfcttc_raw_array.xml DESTINATION share/gnuradio/grc/blocks
diff --git a/drivers/gr-dbfcttc/include/dbfcttc/CMakeLists.txt b/drivers/gr-dbfcttc/include/dbfcttc/CMakeLists.txt
index d3fa95212..5594d092a 100644
--- a/drivers/gr-dbfcttc/include/dbfcttc/CMakeLists.txt
+++ b/drivers/gr-dbfcttc/include/dbfcttc/CMakeLists.txt
@@ -1,21 +1,20 @@
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors)
#
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
#
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# the Free Software Foundation, either version 3 of the License, or
+# at your option) any later version.
#
-# GNU Radio is distributed in the hope that it will be useful,
+# GNSS-SDR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
+# along with GNSS-SDR. If not, see .
+#
########################################################################
# Install public header files
diff --git a/drivers/gr-dbfcttc/lib/CMakeLists.txt b/drivers/gr-dbfcttc/lib/CMakeLists.txt
index 7a42a44ba..43c7bce61 100644
--- a/drivers/gr-dbfcttc/lib/CMakeLists.txt
+++ b/drivers/gr-dbfcttc/lib/CMakeLists.txt
@@ -1,21 +1,20 @@
-# Copyright 2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors)
#
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
#
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# the Free Software Foundation, either version 3 of the License, or
+# at your option) any later version.
#
-# GNU Radio is distributed in the hope that it will be useful,
+# GNSS-SDR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
+# along with GNSS-SDR. If not, see .
+#
########################################################################
# Setup library
@@ -29,13 +28,22 @@ list(APPEND dbfcttc_sources
raw_array_impl.cc
)
+set(dbfcttc_sources "${dbfcttc_sources}" PARENT_SCOPE)
+
add_library(gnuradio-dbfcttc SHARED ${dbfcttc_sources})
target_link_libraries(gnuradio-dbfcttc ${Boost_LIBRARIES} ${PCAP_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES})
set_target_properties(gnuradio-dbfcttc PROPERTIES DEFINE_SYMBOL "gnuradio_dbfcttc_EXPORTS")
+if(APPLE)
+ set_target_properties(gnuradio-dbfcttc PROPERTIES
+ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+ )
+endif(APPLE)
+
########################################################################
# Install built library files
########################################################################
+
install(TARGETS gnuradio-dbfcttc
LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file
ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
diff --git a/drivers/gr-dbfcttc/python/CMakeLists.txt b/drivers/gr-dbfcttc/python/CMakeLists.txt
index 78211b2f2..ae184dc64 100644
--- a/drivers/gr-dbfcttc/python/CMakeLists.txt
+++ b/drivers/gr-dbfcttc/python/CMakeLists.txt
@@ -1,21 +1,20 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors)
#
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
#
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# the Free Software Foundation, either version 3 of the License, or
+# at your option) any later version.
#
-# GNU Radio is distributed in the hope that it will be useful,
+# GNSS-SDR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
+# along with GNSS-SDR. If not, see .
+#
########################################################################
# Include python install macros
@@ -28,20 +27,11 @@ endif()
########################################################################
# Install python sources
########################################################################
-if(APPLE)
- message("WARNING: Hardcoded macports python path!")
- GR_PYTHON_INSTALL(
- FILES
- __init__.py
- DESTINATION /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbfcttc
- )
-else(APPLE)
- GR_PYTHON_INSTALL(
- FILES
- __init__.py
- DESTINATION ${GR_PYTHON_DIR}/dbfcttc
- )
-endif(APPLE)
+GR_PYTHON_INSTALL(
+ FILES
+ __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/dbfcttc
+ )
########################################################################
# Handle the unit tests
diff --git a/drivers/gr-dbfcttc/swig/CMakeLists.txt b/drivers/gr-dbfcttc/swig/CMakeLists.txt
index c27a56879..c10f7309e 100644
--- a/drivers/gr-dbfcttc/swig/CMakeLists.txt
+++ b/drivers/gr-dbfcttc/swig/CMakeLists.txt
@@ -1,25 +1,26 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014 (see AUTHORS file for a list of contributors)
#
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
#
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
+# the Free Software Foundation, either version 3 of the License, or
+# at your option) any later version.
#
-# GNU Radio is distributed in the hope that it will be useful,
+# GNSS-SDR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
+# along with GNSS-SDR. If not, see .
+#
########################################################################
# Include swig generation macros
########################################################################
+#set(PYTHON_EXECUTABLE "/opt/local/bin/python" )
+#set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
find_package(SWIG)
find_package(PythonLibs 2)
if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND)
@@ -44,14 +45,7 @@ GR_SWIG_MAKE(dbfcttc_swig dbfcttc_swig.i)
########################################################################
# Install the build swig module
########################################################################
-
-if(APPLE)
- message("WARNING: Hardcoded macports python path!")
- GR_SWIG_INSTALL(TARGETS dbfcttc_swig DESTINATION /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dbfcttc)
-else(APPLE)
- GR_SWIG_INSTALL(TARGETS dbfcttc_swig DESTINATION ${GR_PYTHON_DIR}/dbfcttc)
-endif(APPLE)
-
+GR_SWIG_INSTALL(TARGETS dbfcttc_swig DESTINATION ${GR_PYTHON_DIR}/dbfcttc)
########################################################################