Bladeren bron

Merge topic 'findprotobuf-mingw' into release-3.27

e978b3b814 FindProtobuf: Fix linking to shared libraries on MinGW

Acked-by: Kitware Robot <[email protected]>
Merge-request: !8609
Brad King 2 jaren geleden
bovenliggende
commit
cd70f0f9eb
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3 3
      Modules/FindProtobuf.cmake

+ 3 - 3
Modules/FindProtobuf.cmake

@@ -556,7 +556,7 @@ if(Protobuf_INCLUDE_DIR)
               INTERFACE_COMPILE_FEATURES cxx_std_11
             )
           endif()
-          if (MSVC AND NOT Protobuf_USE_STATIC_LIBS)
+          if (WIN32 AND NOT Protobuf_USE_STATIC_LIBS)
             set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
               INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
             )
@@ -589,7 +589,7 @@ 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)
+          if (WIN32 AND NOT Protobuf_USE_STATIC_LIBS)
             set_property(TARGET protobuf::libprotobuf-lite APPEND PROPERTY
               INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
             )
@@ -627,7 +627,7 @@ if(Protobuf_INCLUDE_DIR)
               INTERFACE_COMPILE_FEATURES cxx_std_11
             )
           endif()
-          if (MSVC AND NOT Protobuf_USE_STATIC_LIBS)
+          if (WIN32 AND NOT Protobuf_USE_STATIC_LIBS)
             set_property(TARGET protobuf::libprotoc APPEND PROPERTY
               INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
             )