FindProtobuf: C++11 support is required since version 3.6.0

This commit is contained in:
Rolf Eike Beer
2019-06-24 13:30:18 +02:00
committed by Rolf Eike Beer
parent 1009fd1860
commit e28240ea1f

View File

@@ -521,6 +521,11 @@ if(Protobuf_INCLUDE_DIR)
set_target_properties(protobuf::libprotobuf PROPERTIES
IMPORTED_LOCATION_DEBUG "${Protobuf_LIBRARY_DEBUG}")
endif()
if (Protobuf_VERSION VERSION_GREATER_EQUAL "3.6")
set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
INTERFACE_COMPILE_FEATURES cxx_std_11
)
endif()
if(UNIX AND TARGET Threads::Threads)
set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Threads::Threads)