1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-10 20:10:05 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
Carles Fernandez
1a8fc61479
Fix for OpenSUSE/leap 2024-04-16 14:29:19 +02:00
Carles Fernandez
14da62a0ad
Workaround for OpenSUSE/Leap 2024-04-15 13:51:01 +02:00
Carles Fernandez
b99e431f8b
Workaround for OpenSUSE/Leap 2024-04-15 12:11:49 +02:00
2 changed files with 21 additions and 6 deletions

View File

@ -371,7 +371,10 @@ if(CMAKE_VERSION VERSION_LESS "3.4")
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.10")
endif()
if(CMAKE_CROSSCOMPILING OR CMAKE_VERSION VERSION_LESS "3.13")
if(CMAKE_CROSSCOMPILING OR CMAKE_VERSION VERSION_LESS "3.13" OR
((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11")))
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "21.12")
endif()
@ -2536,7 +2539,13 @@ endif()
################################################################################
# Protocol Buffers https://github.com/protocolbuffers/protobuf
################################################################################
find_package(Protobuf)
if(((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11")))
find_package(Protobuf 21.12 EXACT)
else()
find_package(Protobuf)
endif()
set_package_properties(Protobuf PROPERTIES
URL "https://protobuf.dev/"
PURPOSE "Used to serialize output data in a way that can be read by other applications."
@ -2622,7 +2631,7 @@ if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING)
endif()
endif()
if((NOT Protobuf_FOUND) OR (NOT Protobuf_PROTOC_EXECUTABLE) OR (${Protobuf_VERSION} VERSION_LESS ${GNSSSDR_PROTOBUF_MIN_VERSION}))
if((NOT Protobuf_FOUND) OR (NOT Protobuf_PROTOC_EXECUTABLE) OR (${Protobuf_VERSION} VERSION_LESS ${GNSSSDR_PROTOBUF_MIN_VERSION}) OR ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")))
unset(Protobuf_PROTOC_EXECUTABLE)
if(CMAKE_CROSSCOMPILING)
if(NOT Protobuf_FOUND)
@ -2660,6 +2669,10 @@ if((NOT Protobuf_FOUND) OR (NOT Protobuf_PROTOC_EXECUTABLE) OR (${Protobuf_VERSI
set(absl_FOUND OFF)
endif()
endif()
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0"))
unset(absl_FOUND CACHE)
set(absl_FOUND OFF)
endif()
if(absl_FOUND)
set_package_properties(absl PROPERTIES
DESCRIPTION "An open-source collection of C++ code designed to augment the C++ standard library (found: v${absl_VERSION})"
@ -2674,7 +2687,9 @@ if((NOT Protobuf_FOUND) OR (NOT Protobuf_PROTOC_EXECUTABLE) OR (${Protobuf_VERSI
DESCRIPTION "An open-source collection of C++ code designed to augment the C++ standard library"
)
endif()
message(STATUS "The Abseil library (https://github.com/abseil/abseil-cpp) >= v20230117 is required to be installed before building Protocol Buffers >22.x on the fly.")
if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0"))
message(STATUS "The Abseil library (https://github.com/abseil/abseil-cpp) >= v20230117 is required to be installed before building Protocol Buffers >22.x on the fly.")
endif()
message(STATUS " Instead, Protocol Buffers v21.12 will be built, which does not require Abseil.")
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "21.12")
endif()
@ -2787,8 +2802,8 @@ if((NOT Protobuf_FOUND) OR (NOT Protobuf_PROTOC_EXECUTABLE) OR (${Protobuf_VERSI
if(NOT TARGET protobuf::protoc)
add_executable(protobuf::protoc IMPORTED)
add_dependencies(protobuf::protoc protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION})
endif()
add_dependencies(protobuf::protoc protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION})
unset(Protobuf_PROTOC_EXECUTABLE)
set(PROTOBUF_PROTOC_EXECUTABLE "${GNSSSDR_BINARY_DIR}/protobuf-${GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION}/bin/protoc")
set_target_properties(protobuf::protoc PROPERTIES

View File

@ -278,7 +278,7 @@ $ zypper install cmake git gcc-c++ boost-devel libboost_atomic-devel \
libboost_system-devel libboost_filesystem-devel libboost_chrono-devel \
libboost_thread-devel libboost_serialization-devel log4cpp-devel \
gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool \
automake hdf5-devel openssl-devel python3-Mako protobuf-devel
automake hdf5-devel openssl-devel python3-Mako libmatio-devel
```
If you are using openSUSE Tumbleweed: