11
22if (Protobuf_SELECT_VERSION STREQUAL "3.9.0" )
3- # Check that python and protobuf versions are compatible
4- if (fletch_BUILD_WITH_PYTHON)
5- # Note the python protobuf wrapper is not installed here.
6- # Instead it must be installed via `pip install protobuf`
7- if (fletch_PYTHON_MAJOR_VERSION MATCHES "^2.*" )
8- message (ERROR " Must use Python >= 3.x with Protobuf 3.x" )
9- endif ()
10- endif ()
11-
12-
133 ExternalProject_Add (Protobuf
144# PREFIX protobuf
155 URL ${Protobuf_url}
@@ -21,24 +11,13 @@ if (Protobuf_SELECT_VERSION STREQUAL "3.9.0")
2111# COMMAND ${CMAKE_COMMAND} -DPULSE_IL2CPP_PATCH=${PULSE_IL2CPP_PATCH} -Dprotobuf_source=${protobuf_SRC} -Dprotobuf_patch=${protobuf_Patch} -P ${protobuf_Patch}/Patch.cmake
2212 CMAKE_ARGS
2313 ${COMMON_CMAKE_ARGS}
24- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
2514 -Dprotobuf_BUILD_TESTS:BOOL=OFF
2615 -Dprotobuf_BUILD_EXAMPLES:BOOL=OFF
27- -Dprotobuf_BUILD_SHARED_LIBS:BOOL=OFF
16+ -Dprotobuf_BUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
2817 -Dprotobuf_MSVC_STATIC_RUNTIME:BOOL=OFF #Don't change MSVC runtime settings (/MD or /MT)
2918 -Dprotobuf_WITH_ZLIB:BOOL=OFF
3019 )
3120elseif (NOT WIN32 )
32-
33- # Check that python and protobuf versions are compatible
34- if (fletch_BUILD_WITH_PYTHON AND fletch_ENABLE_Protobuf)
35- # Note the python protobuf wrapper is not installed here.
36- # Instead it must be installed via `pip install protobuf`
37- if (${Protobuf_version} LESS 3.0 AND fletch_PYTHON_MAJOR_VERSION MATCHES "^3.*" )
38- message (ERROR " You must use Protobuf >= 3.x with Python 3.x" )
39- endif ()
40- endif ()
41-
4221 set (Protobuf_PATCH_DIR ${fletch_SOURCE_DIR} /Patches/Protobuf/${Protobuf_SELECT_VERSION} )
4322 if (EXISTS ${Protobuf_PATCH_DIR} )
4423 set (Protobuf_PATCH_COMMAND ${CMAKE_COMMAND}
0 commit comments