Commit a6cc7259 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'FindProtobuf-DLLs'

3bbd85d5 FindProtobuf: Fix usage of protobuf dynamic libraries on Windows
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3555
parents aa5ec6f4 3bbd85d5
......@@ -526,6 +526,11 @@ if(Protobuf_INCLUDE_DIR)
INTERFACE_COMPILE_FEATURES cxx_std_11
)
endif()
if (MSVC AND NOT Protobuf_USE_STATIC_LIBS)
set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
)
endif()
if(UNIX AND TARGET Threads::Threads)
set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Threads::Threads)
......@@ -554,6 +559,11 @@ if(Protobuf_INCLUDE_DIR)
set_target_properties(protobuf::libprotobuf-lite PROPERTIES
IMPORTED_LOCATION_DEBUG "${Protobuf_LITE_LIBRARY_DEBUG}")
endif()
if (MSVC AND NOT Protobuf_USE_STATIC_LIBS)
set_property(TARGET protobuf::libprotobuf-lite APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
)
endif()
if(UNIX AND TARGET Threads::Threads)
set_property(TARGET protobuf::libprotobuf-lite APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Threads::Threads)
......@@ -587,6 +597,11 @@ if(Protobuf_INCLUDE_DIR)
INTERFACE_COMPILE_FEATURES cxx_std_11
)
endif()
if (MSVC AND NOT Protobuf_USE_STATIC_LIBS)
set_property(TARGET protobuf::libprotoc APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
)
endif()
if(UNIX AND TARGET Threads::Threads)
set_property(TARGET protobuf::libprotoc APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Threads::Threads)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment