Skip to content

Commit 1cb19bf

Browse files
authored
fix bug of the cmake variable protobuf_MSVC_STATIC_CRT (#22599)
1 parent 8d8527f commit 1cb19bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/external/protobuf.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
194194
IF(WIN32)
195195
SET(OPTIONAL_ARGS ${OPTIONAL_ARGS}
196196
"-DCMAKE_GENERATOR=${CMAKE_GENERATOR}"
197-
"-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}")
197+
"-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}"
198+
"-Dprotobuf_MSVC_STATIC_RUNTIME=${MSVC_STATIC_CRT}")
198199
ENDIF()
199200

200201
SET(PROTOBUF_REPOSITORY https://github.com/protocolbuffers/protobuf.git)
@@ -224,7 +225,6 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
224225
-DCMAKE_INSTALL_PREFIX=${PROTOBUF_INSTALL_DIR}
225226
-DCMAKE_INSTALL_LIBDIR=lib
226227
-DBUILD_SHARED_LIBS=OFF
227-
-Dprotobuf_MSVC_STATIC_RUNTIME=${MSVC_STATIC_CRT}
228228
CMAKE_CACHE_ARGS
229229
-DCMAKE_INSTALL_PREFIX:PATH=${PROTOBUF_INSTALL_DIR}
230230
-DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}

0 commit comments

Comments
 (0)