mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-03-31 07:47:02 +00:00
Fix building if boost iostreams is not present
This commit is contained in:
parent
d1f21d2cb0
commit
89bbc565a8
@ -26,38 +26,43 @@ endif()
|
|||||||
|
|
||||||
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GPSTK_INCLUDE_DIR}/gpstk)
|
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GPSTK_INCLUDE_DIR}/gpstk)
|
||||||
|
|
||||||
find_package(Boost COMPONENTS iostreams serialization REQUIRED)
|
find_package(Boost COMPONENTS iostreams serialization QUIET)
|
||||||
|
|
||||||
include_directories(
|
if(Boost_FOUND)
|
||||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
include_directories(
|
||||||
${GFlags_INCLUDE_DIRS}
|
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||||
${Boost_INCLUDE_DIRS}
|
${GFlags_INCLUDE_DIRS}
|
||||||
${GPSTK_INCLUDE_DIR}/gpstk
|
${Boost_INCLUDE_DIRS}
|
||||||
${GPSTK_INCLUDE_DIR}
|
${GPSTK_INCLUDE_DIR}/gpstk
|
||||||
)
|
${GPSTK_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||||
|
|
||||||
add_executable(rinex2assist ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
add_executable(rinex2assist ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
||||||
|
|
||||||
target_link_libraries(rinex2assist
|
target_link_libraries(rinex2assist
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${GPSTK_LIBRARY}
|
${GPSTK_LIBRARY}
|
||||||
${GFlags_LIBS}
|
${GFlags_LIBS}
|
||||||
gnss_sp_libs
|
gnss_sp_libs
|
||||||
gnss_rx
|
gnss_rx
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
||||||
add_dependencies(rinex2assist gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
|
add_dependencies(rinex2assist gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_command(TARGET rinex2assist POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:rinex2assist>
|
||||||
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:rinex2assist>
|
||||||
|
)
|
||||||
|
|
||||||
|
install(TARGETS rinex2assist
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
COMPONENT "rinex2assist"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
message(STATUS "Boost iostrems library not found.")
|
||||||
|
message(STATUS "rinex2assist will not be built.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_command(TARGET rinex2assist POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:rinex2assist>
|
|
||||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:rinex2assist>
|
|
||||||
)
|
|
||||||
|
|
||||||
install(TARGETS rinex2assist
|
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
COMPONENT "rinex2assist"
|
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user