1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Merge branch 'protobuf' of https://github.com/carlesfernandez/gnss-sdr into protobuf

This commit is contained in:
Carles Fernandez 2019-04-21 10:22:53 +02:00
commit c851d7dff9
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -1799,6 +1799,21 @@ if(ENABLE_PROTOBUF)
PURPOSE "Used to serialize output data in a way that can be read by other applications." PURPOSE "Used to serialize output data in a way that can be read by other applications."
TYPE REQUIRED TYPE REQUIRED
) )
if(Protobuf_FOUND AND CMAKE_VERSION VERSION_LESS 3.9)
add_library(protobuf::libprotobuf SHARED IMPORTED)
set_target_properties(protobuf::libprotobuf PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${Protobuf_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${Protobuf_LIBRARY}"
)
add_executable(protobuf::protoc IMPORTED)
set_target_properties(protobuf::protoc PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}"
INTERFACE_LINK_LIBRARIES "${Protobuf_PROTOC_LIBRARY}"
)
endif()
if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING) if(Protobuf_FOUND AND CMAKE_CROSSCOMPILING)
find_program(PROTOC_EXECUTABLE protoc find_program(PROTOC_EXECUTABLE protoc
HINTS HINTS