Skip to content

Commit

Permalink
Add vcpkg patches to upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
leemaguire committed May 30, 2024
1 parent ae3b22a commit f864d40
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ endif()
# Just use -lz and let Xcode figure it out
# Emscripten does provide Zlib, but it doesn't work with find_package and is handled specially
if(NOT APPLE AND NOT EMSCRIPTEN AND NOT TARGET ZLIB::ZLIB)
if(WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND REALM_LINUX_TOOLCHAIN))
if((WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND REALM_LINUX_TOOLCHAIN)) AND NOT DEFINED VCPKG_TOOLCHAIN)
find_package(ZLIB)
if (NOT ZLIB_FOUND)
realm_acquire_dependency(zlib ${DEP_ZLIB_VERSION} ZLIB_CMAKE_INCLUDE_FILE)
Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/index_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ inline ChunkedRangeVectorIterator<T> ChunkedRangeVectorIterator<T>::operator--(i
}

template <typename T>
#if REALM_WINDOWS && REALM_ARCHITECTURE_ARM64
#if defined(_MSC_VER) && REALM_ARCHITECTURE_ARM64
// Inlining this function crashes msvc when targeting arm64 in as of 19.39.33523
__declspec(noinline)
#endif
Expand Down
2 changes: 1 addition & 1 deletion tools/cmake/RealmConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ find_dependency(Threads)
# so for an iOS build it'll use the path from the Device plaform, which is an error on Simulator.
# Just use -lz and let Xcode figure it out
if(TARGET Realm::Sync AND NOT APPLE AND NOT TARGET ZLIB::ZLIB)
if(WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND REALM_LINUX_TOOLCHAIN))
if((WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND REALM_LINUX_TOOLCHAIN)) AND NOT DEFINED VCPKG_TOOLCHAIN)
find_package(ZLIB)
if (NOT ZLIB_FOUND)
realm_acquire_dependency(zlib @DEP_ZLIB_VERSION@ ZLIB_CMAKE_INCLUDE_FILE)
Expand Down

0 comments on commit f864d40

Please sign in to comment.