diff --git a/vcpkg/ports/qgis/libprotobuf-lite.patch b/vcpkg/ports/qgis/libprotobuf-lite.patch new file mode 100644 index 0000000000..591e1c8929 --- /dev/null +++ b/vcpkg/ports/qgis/libprotobuf-lite.patch @@ -0,0 +1,38 @@ +From e3a41d679edfd64d5fa4caa33c8564d9163ebdcd Mon Sep 17 00:00:00 2001 +From: Matthias Kuhn +Date: Fri, 15 Mar 2024 16:50:00 +0100 +Subject: [PATCH] Switch to conditional protobuf-lite target + +The original version number check was completely random numbers +--- + CMakeLists.txt | 3 --- + src/core/CMakeLists.txt | 2 +- + 2 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 564a1fe30bb4..e6f1278f7bf4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -375,9 +375,6 @@ if(WITH_CORE) + + find_package(Protobuf CONFIG) + find_package(Protobuf REQUIRED) +- if(Protobuf_VERSION GREATER_EQUAL 4.23) +- set(Protobuf_LITE_LIBRARY protobuf::libprotobuf-lite) +- endif() + + message(STATUS "Found Protobuf: ${Protobuf_LIBRARIES}") + if (NOT Protobuf_PROTOC_EXECUTABLE) +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 26fca1e2bf99..692753b4e273 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -2460,7 +2460,7 @@ target_link_libraries(qgis_core + EXPAT::EXPAT + ${SQLITE3_LIBRARY} + ${LIBZIP_LIBRARY} +- ${Protobuf_LITE_LIBRARY} ++ $ + ${ZLIB_LIBRARIES} + ${EXIV2_LIBRARY} + PROJ::proj diff --git a/vcpkg/ports/qgis/portfile.cmake b/vcpkg/ports/qgis/portfile.cmake index 08576cde7a..f27ed74acc 100644 --- a/vcpkg/ports/qgis/portfile.cmake +++ b/vcpkg/ports/qgis/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_from_github( sts.patch # Obsolete in QGIS >= 3.36.1 crssync-no-install.patch include-qthread.patch + libprotobuf-lite.patch ) file(REMOVE ${SOURCE_PATH}/cmake/FindGDAL.cmake)