diff options
author | مهدي شينون (Mehdi Chinoune) <mehdi.chinoune@hotmail.com> | 2023-07-02 06:19:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-07-05 12:25:01 (GMT) |
commit | e978b3b8143b663b2ae0b206c2f95e093d13ddaa (patch) | |
tree | 70b174d123baf879215a2f4aa8a36a226d3e3289 /Modules/FindProtobuf.cmake | |
parent | b384058e4ba77defdff8741db636f60d6843d87d (diff) | |
download | CMake-e978b3b8143b663b2ae0b206c2f95e093d13ddaa.zip CMake-e978b3b8143b663b2ae0b206c2f95e093d13ddaa.tar.gz CMake-e978b3b8143b663b2ae0b206c2f95e093d13ddaa.tar.bz2 |
FindProtobuf: Fix linking to shared libraries on MinGW
Fixes: #25011
Diffstat (limited to 'Modules/FindProtobuf.cmake')
-rw-r--r-- | Modules/FindProtobuf.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index b046fcc..b2567c0 100644 --- a/Modules/FindProtobuf.cmake +++ b/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" ) |