mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-07 07:50:32 +00:00
Add Boost::atomic target, required by Boost::thread in some configurations (e.g. OpenSUSE)
This commit is contained in:
parent
eb281bcd68
commit
999604cd75
@ -501,7 +501,7 @@ set(Boost_ADDITIONAL_VERSIONS
|
|||||||
)
|
)
|
||||||
set(Boost_USE_MULTITHREAD ON)
|
set(Boost_USE_MULTITHREAD ON)
|
||||||
set(Boost_USE_STATIC_LIBS OFF)
|
set(Boost_USE_STATIC_LIBS OFF)
|
||||||
find_package(Boost COMPONENTS date_time system filesystem thread serialization chrono REQUIRED)
|
find_package(Boost COMPONENTS date_time system filesystem thread serialization chrono atomic REQUIRED)
|
||||||
if(NOT Boost_FOUND)
|
if(NOT Boost_FOUND)
|
||||||
message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.")
|
message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.")
|
||||||
endif()
|
endif()
|
||||||
@ -568,6 +568,15 @@ if(CMAKE_VERSION VERSION_LESS 3.5)
|
|||||||
set_property(TARGET Boost::chrono PROPERTY
|
set_property(TARGET Boost::chrono PROPERTY
|
||||||
IMPORTED_LOCATION ${Boost_CHRONO_LIBRARIES})
|
IMPORTED_LOCATION ${Boost_CHRONO_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
if(NOT TARGET Boost::atomic)
|
||||||
|
add_library(Boost::atomic SHARED IMPORTED)
|
||||||
|
set_property(TARGET Boost::atomic PROPERTY
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
|
||||||
|
set_property(TARGET Boost::atomic PROPERTY
|
||||||
|
INTERFACE_LINK_LIBRARIES ${Boost_ATOMIC_LIBRARIES})
|
||||||
|
set_property(TARGET Boost::atomic PROPERTY
|
||||||
|
IMPORTED_LOCATION ${Boost_ATOMIC_LIBRARIES})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,17 +40,12 @@ target_link_libraries(front_end_cal_lib
|
|||||||
Glog::glog
|
Glog::glog
|
||||||
Gnuradio::blocks
|
Gnuradio::blocks
|
||||||
Gnuradio::runtime
|
Gnuradio::runtime
|
||||||
Boost::boost
|
|
||||||
Boost::serialization
|
Boost::serialization
|
||||||
Boost::thread
|
Boost::thread
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
||||||
|
|
||||||
add_custom_command(TARGET front-end-cal POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:front-end-cal>
|
|
||||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
|
|
||||||
|
|
||||||
target_link_libraries(front-end-cal
|
target_link_libraries(front-end-cal
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${MAC_LIBRARIES}
|
${MAC_LIBRARIES}
|
||||||
@ -70,6 +65,10 @@ target_compile_definitions(front-end-cal
|
|||||||
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_custom_command(TARGET front-end-cal POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:front-end-cal>
|
||||||
|
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
|
||||||
|
|
||||||
install(TARGETS front-end-cal
|
install(TARGETS front-end-cal
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
COMPONENT "front-end-cal"
|
COMPONENT "front-end-cal"
|
||||||
|
Loading…
Reference in New Issue
Block a user