vcpkg/ports/realm-core/fix-zlib.patch
jim wang 5eba049322
[vcpkg baseline][realm-core] Fix zlib lookup failure (#38832)
Fixes regression:
https://dev.azure.com/vcpkg/public/_build/results?buildId=103057&view=results
```
REGRESSION: realm-core:x64-android failed with BUILD_FAILED
REGRESSION: realm-core:arm-neon-android failed with BUILD_FAILED
REGRESSION: realm-core:arm64-android failed with BUILD_FAILED
```
Error:
```
CMake Error at /mnt/vcpkg-ci/installed/x64-android/share/zlib/vcpkg-cmake-wrapper.cmake:5 (message):
  Broken installation of vcpkg port zlib
Call Stack (most recent call first):
  /vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
  CMakeLists.txt:336 (find_package)
```

- [X] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] ~~SHA512s are updated for each updated download.~~
- [ ] ~~The "supports" clause reflects platforms that may be fixed by
this new version.~~
- [ ] ~~Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~~
- [ ] ~~Any patches that are no longer applied are deleted from the
port's directory.~~
- [X] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [X] Only one version is added to each modified port's versions file.


Compile test pass with following triplets:
```
x64-android
arm64-android
```
2024-05-22 01:00:32 -07:00

13 lines
572 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d5710f..c57e2dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -331,7 +331,6 @@ if(NOT APPLE AND NOT EMSCRIPTEN AND NOT TARGET ZLIB::ZLIB)
# We want to link against the stub library instead of statically linking anyway,
# so we hack find_library to only consider shared object libraries when looking for libz
set(_CMAKE_FIND_LIBRARY_SUFFIXES_orig ${CMAKE_FIND_LIBRARY_SUFFIXES})
- set(CMAKE_FIND_LIBRARY_SUFFIXES .so)
endif()
find_package(ZLIB REQUIRED)
if(ANDROID)