mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-08 19:56:46 +00:00
Fixes Mac OS X crash when using the block "raw_array" in gnuradio-companion installed with Macports
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@493 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
cda42d060f
commit
01f8e403ad
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
########################################################################
|
||||
@ -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)
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
install(FILES
|
||||
dbfcttc_raw_array.xml DESTINATION share/gnuradio/grc/blocks
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
########################################################################
|
||||
# Install public header files
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
########################################################################
|
||||
# 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
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
########################################################################
|
||||
# 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
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
########################################################################
|
||||
# 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)
|
||||
|
||||
|
||||
########################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user