mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-06 14:10:11 +00:00
Improve detecton of Protocol Buffers compiler when cross-compiling
This commit is contained in:
parent
16f9e623c1
commit
01ea7ed831
@ -1871,19 +1871,22 @@ if(Protobuf_FOUND AND CMAKE_VERSION VERSION_LESS 3.9)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING)
|
if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING)
|
||||||
find_program(PROTOC_EXECUTABLE protoc
|
find_program(PROTOC_EXECUTABLE protoc)
|
||||||
HINTS
|
if(NOT PROTOC_EXECUTABLE)
|
||||||
/usr/local/bin/
|
find_program(PROTOC_EXECUTABLE protoc
|
||||||
/usr/bin/
|
HINTS
|
||||||
NO_SYSTEM_ENVIRONMENT_PATH
|
/usr/bin/
|
||||||
)
|
/usr/local/bin/
|
||||||
|
)
|
||||||
|
endif()
|
||||||
if(PROTOC_EXECUTABLE)
|
if(PROTOC_EXECUTABLE)
|
||||||
set_target_properties(protobuf::protoc PROPERTIES
|
set_target_properties(protobuf::protoc PROPERTIES
|
||||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||||
IMPORTED_LOCATION ${PROTOC_EXECUTABLE}
|
IMPORTED_LOCATION ${PROTOC_EXECUTABLE}
|
||||||
)
|
)
|
||||||
|
set(Protobuf_PROTOC_EXECUTABLE ${PROTOC_EXECUTABLE})
|
||||||
else()
|
else()
|
||||||
message(FATAL ERROR "Please install the Protocol Buffers compiter v${Protobuf_VERSION} in the host machine")
|
message(FATAL_ERROR "Please install the Protocol Buffers compiler v${Protobuf_VERSION} in the host machine")
|
||||||
endif()
|
endif()
|
||||||
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}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user