1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 04:30:33 +00:00
This commit is contained in:
Carles Fernandez 2019-02-07 09:29:05 +01:00
commit a4b4591b7a
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
8 changed files with 49 additions and 26 deletions

View File

@ -437,7 +437,7 @@ endif()
################################################################################ ################################################################################
if(CMAKE_VERSION VERSION_LESS 3.1) if(CMAKE_VERSION VERSION_LESS 3.1)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
set(THREAD_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) add_library(Threads::Threads ALIAS ${CMAKE_THREAD_LIBS_INIT})
else() else()
set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
if(CMAKE_CROSSCOMPILING) if(CMAKE_CROSSCOMPILING)
@ -446,7 +446,6 @@ else()
set(THREADS_PREFER_PTHREAD_FLAG TRUE) set(THREADS_PREFER_PTHREAD_FLAG TRUE)
endif() endif()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
set(THREAD_LIBRARIES Threads::Threads)
endif() endif()
@ -1101,7 +1100,6 @@ endif()
if(NOT ENABLE_LOG) if(NOT ENABLE_LOG)
message(STATUS "Logging is not enabled") message(STATUS "Logging is not enabled")
target_compile_definitions(Glog::glog PUBLIC -DGOOGLE_STRIP_LOG=1)
endif() endif()

View File

@ -573,7 +573,7 @@ First, install [Homebrew](https://brew.sh/). Paste this in a terminal prompt:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
~~~~~~ ~~~~~~
The script explains what it will do and then pauses before it does it. There are more installation options [here](https://docs.brew.sh/Installation.html). The script explains what it will do, and then it pauses before doing it. There are more installation options [here](https://docs.brew.sh/Installation.html).
Install pip: Install pip:
@ -584,17 +584,26 @@ $ sudo easy_install pip
Install the required dependencies: Install the required dependencies:
~~~~~~ ~~~~~~
$ brew tap homebrew/science $ brew install cmake
$ brew install cmake hdf5 arpack superlu $ brew install hdf5 arpack superlu armadillo
$ brew install armadillo $ brew install glog gflags
$ brew install glog gflags gnutls
$ brew install gnuradio $ brew install gnuradio
$ brew install libmatio $ brew install libmatio
$ brew install log4cpp
$ brew install pugixml $ brew install pugixml
$ pip install mako $ pip install mako
$ pip install six $ pip install six
$ brew install openssl
~~~~~~ ~~~~~~
In the last step, Homebrew installs OpenSSL but it does not link it into `/usr/local`. Thus, you must manually link it instead:
~~~~~~
$ ln -s /usr/local/opt/openssl/include/openssl /usr/local/include
$ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
~~~~~~
#### Build GNSS-SDR #### Build GNSS-SDR
Finally, you are ready to clone the GNSS-SDR repository, configure and build the software: Finally, you are ready to clone the GNSS-SDR repository, configure and build the software:

View File

@ -32,9 +32,12 @@ find_path(PUGIXML_INCLUDE_DIR
PATHS ${PUGIXML_HOME}/include PATHS ${PUGIXML_HOME}/include
/usr/include /usr/include
/usr/local/include /usr/local/include
/usr/local/include/pugixml-1.9
/opt/local/include /opt/local/include
${PUGIXML_ROOT}/include ${PUGIXML_ROOT}/include
$ENV{PUGIXML_ROOT}/include $ENV{PUGIXML_ROOT}/include
${PUGIXML_ROOT}/include/pugixml-1.9
$ENV{PUGIXML_ROOT}/include/pugixml-1.9
) )
find_library(PUGIXML_LIBRARY find_library(PUGIXML_LIBRARY
@ -51,6 +54,7 @@ find_library(PUGIXML_LIBRARY
/usr/lib/powerpc64le-linux-gnu /usr/lib/powerpc64le-linux-gnu
/usr/lib/s390x-linux-gnu /usr/lib/s390x-linux-gnu
/usr/local/lib /usr/local/lib
/usr/local/lib/pugixml-1.9
/opt/local/lib /opt/local/lib
/usr/lib /usr/lib
/usr/lib64 /usr/lib64
@ -59,6 +63,10 @@ find_library(PUGIXML_LIBRARY
$ENV{PUGIXML_ROOT}/lib $ENV{PUGIXML_ROOT}/lib
${PUGIXML_ROOT}/lib64 ${PUGIXML_ROOT}/lib64
$ENV{PUGIXML_ROOT}/lib64 $ENV{PUGIXML_ROOT}/lib64
${PUGIXML_ROOT}/lib/pugixml-1.9
$ENV{PUGIXML_ROOT}/lib/pugixml-1.9
${PUGIXML_ROOT}/lib64/pugixml-1.9
$ENV{PUGIXML_ROOT}/lib64/pugixml-1.9
) )
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found. # Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.

View File

@ -48,12 +48,12 @@ find_library(TELEORBIT_LIBRARIES
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TELEORBIT DEFAULT_MSG TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS) find_package_handle_standard_args(TELEORBIT DEFAULT_MSG TELEORBIT_LIBRARIES TELEORBIT_INCLUDE_DIRS)
if(TELEORBIT_FOUND AND NOT TARGET Gnuradio:teleorbit) if(TELEORBIT_FOUND AND NOT TARGET Gnuradio::teleorbit)
add_library(Gnuradio:teleorbit SHARED IMPORTED) add_library(Gnuradio::teleorbit SHARED IMPORTED)
set_target_properties(Gnuradio:teleorbit PROPERTIES set_target_properties(Gnuradio::teleorbit PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${TELEORBIT_LIBRARIES}" IMPORTED_LOCATION "${TELEORBIT_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${TELEORBIT_INCLUDE_DIRS};${TELEORBIT_INCLUDE_DIR}/teleorbit" INTERFACE_INCLUDE_DIRECTORIES "${TELEORBIT_INCLUDE_DIRS};${TELEORBIT_INCLUDE_DIRS}/teleorbit"
INTERFACE_LINK_LIBRARIES "${TELEORBIT_LIBRARIES}" INTERFACE_LINK_LIBRARIES "${TELEORBIT_LIBRARIES}"
) )
endif() endif()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -17,12 +17,6 @@
# #
if(OS_IS_MACOSX)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(MAC_LIBRARIES "-lc++")
endif()
endif()
add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc) add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
target_link_libraries(gnss-sdr target_link_libraries(gnss-sdr
@ -33,11 +27,15 @@ target_link_libraries(gnss-sdr
Glog::glog Glog::glog
gnss_rx gnss_rx
gnss_sdr_flags gnss_sdr_flags
${THREAD_LIBRARIES} Threads::Threads
${MAC_LIBRARIES}
) )
target_compile_definitions(gnss-sdr PUBLIC -DGNSS_SDR_VERSION="${VERSION}") # Disable internal logging
if(NOT ENABLE_LOG)
target_compile_definitions(gnss-sdr PRIVATE -DGOOGLE_STRIP_LOG=1)
endif()
target_compile_definitions(gnss-sdr PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
if(ENABLE_CUDA) if(ENABLE_CUDA)
target_link_libraries(gnss-sdr target_link_libraries(gnss-sdr
@ -65,6 +63,15 @@ if(ENABLE_GPERFTOOLS)
endif() endif()
endif() endif()
if(OS_IS_MACOSX)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_link_libraries(gnss-sdr
PUBLIC
"-lc++"
)
endif()
endif()
add_custom_command(TARGET gnss-sdr add_custom_command(TARGET gnss-sdr
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gnss-sdr> POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gnss-sdr>
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:gnss-sdr> ${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:gnss-sdr>

View File

@ -96,7 +96,7 @@ if(NOT ${GTEST_DIR_LOCAL})
set(GTEST_LIBRARIES set(GTEST_LIBRARIES
${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX} ${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}
${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX} ${binary_dir}/googletest/${ADD_DEBUG}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${FINAL_D}${CMAKE_STATIC_LIBRARY_SUFFIX}
${THREAD_LIBRARIES}) Threads::Threads)
set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest") set(GTEST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest")
else() else()
if(GTEST_INCLUDE_DIRS) if(GTEST_INCLUDE_DIRS)
@ -110,7 +110,7 @@ else()
add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc) add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc)
set(GTEST_LIBRARIES gtest) set(GTEST_LIBRARIES gtest)
endif() endif()
target_link_libraries(gtest PUBLIC ${THREAD_LIBRARIES}) target_link_libraries(gtest PUBLIC Threads::Threads)
endif() endif()
@ -459,7 +459,7 @@ if(ENABLE_SYSTEM_TESTING)
add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}") add_definitions(-DHOST_SYSTEM="${HOST_SYSTEM}")
#### TTFF #### TTFF
set(OPT_LIBS_ ${Boost_LIBRARIES} ${THREAD_LIBRARIES} Gflags::gflags Glog::glog set(OPT_LIBS_ ${Boost_LIBRARIES} Threads::Threads Gflags::gflags Glog::glog
Gnuradio::runtime ${GTEST_LIBRARIES} Gnuradio::runtime ${GTEST_LIBRARIES}
Gnuradio::blocks Gnuradio::filter Gnuradio::blocks Gnuradio::filter
Gnuradio::analog gnss_sp_libs Gnuradio::analog gnss_sp_libs
@ -468,7 +468,7 @@ if(ENABLE_SYSTEM_TESTING)
if(ENABLE_SYSTEM_TESTING_EXTRA) if(ENABLE_SYSTEM_TESTING_EXTRA)
#### POSITION_TEST #### POSITION_TEST
set(OPT_LIBS_ ${Boost_LIBRARIES} ${THREAD_LIBRARIES} Gflags::gflags Glog::glog set(OPT_LIBS_ ${Boost_LIBRARIES} Threads::Threads Gflags::gflags Glog::glog
${GTEST_LIBRARIES} Gnuradio::runtime ${GTEST_LIBRARIES} Gnuradio::runtime
Gnuradio::blocks Gnuradio::filter Gnuradio::blocks Gnuradio::filter
Gnuradio::analog Matio::matio Volkgnsssdr::volkgnsssdr Gnuradio::analog Matio::matio Volkgnsssdr::volkgnsssdr

View File

@ -26,7 +26,7 @@ source_group(Headers FILES ${FRONT_END_CAL_HEADERS})
target_link_libraries(front_end_cal_lib target_link_libraries(front_end_cal_lib
PUBLIC PUBLIC
Armadillo::armadillo Armadillo::armadillo
${THREAD_LIBRARIES} Threads::Threads
acq_adapters acq_adapters
Volkgnsssdr::volkgnsssdr ${ORC_LIBRARIES} Volkgnsssdr::volkgnsssdr ${ORC_LIBRARIES}
rx_core_lib rx_core_lib
@ -35,6 +35,7 @@ target_link_libraries(front_end_cal_lib
channel_fsm channel_fsm
gnss_sp_libs gnss_sp_libs
PRIVATE PRIVATE
Gflags::gflags
Glog::glog Glog::glog
Gnuradio::blocks Gnuradio::blocks
Gnuradio::runtime Gnuradio::runtime