Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/absl/container/CMakeLists.txt b/absl/container/CMakeLists.txt
index 365c6ea..d12e585 100644
--- a/absl/container/CMakeLists.txt
+++ b/absl/container/CMakeLists.txt
@@ -1119,6 +1119,7 @@ absl_cc_library(
absl::config
absl::test_instance_tracker
GTest::gmock
+ TESTONLY
)

absl_cc_library(
20 changes: 20 additions & 0 deletions extern/vcpkg-overlays/abseil/fix-mingw-dll.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake
--- a/CMake/AbseilDll.cmake
+++ b/CMake/AbseilDll.cmake
@@ -457,12 +457,14 @@ set(ABSL_INTERNAL_DLL_FILES
"strings/string_view.h"
)

-if(MSVC)
+if(MSVC OR MINGW)
list(APPEND ABSL_INTERNAL_DLL_FILES
"time/internal/cctz/src/time_zone_name_win.cc"
"time/internal/cctz/src/time_zone_name_win.h"
)
-else()
+endif()
+
+if(NOT MSVC)
list(APPEND ABSL_INTERNAL_DLL_FILES
"flags/commandlineflag.cc"
"flags/commandlineflag.h"
167 changes: 136 additions & 31 deletions extern/vcpkg-overlays/abseil/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,59 +1,164 @@
# =============================================================================
# Cesium for Unreal — Custom Abseil overlay port
# =============================================================================
#
# This overlay customizes the standard vcpkg abseil port in several ways
# required for compatibility with Unreal Engine. When upgrading the abseil
# version, re-apply each customization described below and verify it is still
# necessary.
#
# CUSTOMIZATION HISTORY:
# Originally created Nov 2024 (abseil 20240722.0) to fix Android and MSVC
# build issues. Updated to 20260107.1 to match the vcpkg 2026.04.27 baseline.
#
# BACKGROUND — Unreal Engine and the Android NDK:
# Unreal Engine uses C++20. However, the Android NDK version bundled with
# Unreal has incomplete C++20 *library* support even though the compiler
# supports C++20 *language* features. This means headers that are compiled
# as part of Unreal's Android build (including installed vcpkg headers) must
# not rely on C++20 standard library types such as std::partial_ordering.
# We build abseil itself with C++17 to avoid any C++20 library dependencies
# in abseil's own compilation. We additionally patch the installed headers
# to be safe when included by Unreal's C++20 Android build.

if(NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO abseil/abseil-cpp
REF "20240722.0"
SHA512 bd2cca8f007f2eee66f51c95a979371622b850ceb2ce3608d00ba826f7c494a1da0fba3c1427728f2c173fe50d59b701da35c2c9fdad2752a5a49746b1c8ef31
REF "20260107.1"
SHA512 f5012885d6b6844a9cf5ed92ad5468b8757db33dfe1364bfb232fff928e06c550c7eb4557f45186a8ac4d18b178df9be267681abab4a6de40823b574afbe9960
HEAD_REF master
PATCHES
# Fixes a missing TESTONLY marker that causes build errors when tests
# are not being built. Taken from the upstream vcpkg port.
fix-heterogeneous_lookup_testing-target.patch
# Fixes DLL builds when targeting MinGW. Taken from the upstream vcpkg
# port.
fix-mingw-dll.patch
# NOTE: The upstream vcpkg port also includes 003-force-cxx-17.patch,
# which prevents abseil from advertising cxx_std_20 as a requirement
# to consumers (via target_compile_features) even when a C++20 compiler
# is in use. We intentionally omit it because we set
# ABSL_PROPAGATE_CXX_STD=OFF below, which makes abseil not propagate
# any C++ standard requirement at all.
)

# With ABSL_PROPAGATE_CXX_STD=ON abseil automatically detect if it is being
# compiled with C++14 or C++17, and modifies the installed `absl/base/options.h`
# header accordingly. This works even if CMAKE_CXX_STANDARD is not set. Abseil
# uses the compiler default behavior to update `absl/base/options.h` as needed.
set(ABSL_USE_CXX17_OPTION "")
if("cxx17" IN_LIST FEATURES)
set(ABSL_USE_CXX17_OPTION "-DCMAKE_CXX_STANDARD=17")
endif()
# -----------------------------------------------------------------------------
# CUSTOMIZATION 1: Prevent abseil from overriding CMAKE_MSVC_RUNTIME_LIBRARY
# -----------------------------------------------------------------------------
# Abseil's CMakeLists.txt unconditionally sets CMAKE_MSVC_RUNTIME_LIBRARY,
# which conflicts with Unreal Engine's choice of MultiThreadedDLL. We comment
# it out so our setting (established by the triplet) wins.
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt"
"set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>\")"
"#set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>\")")
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt"
"set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL\")"
"#set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL\")")

# -----------------------------------------------------------------------------
# CUSTOMIZATION 2: Rename the inline namespace
# -----------------------------------------------------------------------------
# Unreal Engine ships its own copy of abseil. To prevent ODR violations and
# linker errors when both copies are linked into the same binary, we rename
# abseil's inline namespace from "lts_20260107" to
# "lts_20260107_cesium_for_unreal". This makes all mangled symbol names unique.
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h"
"ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20260107"
"ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20260107_cesium_for_unreal")

# -----------------------------------------------------------------------------
# CUSTOMIZATION 3: Suppress ABSL_LTS_RELEASE_VERSION
# -----------------------------------------------------------------------------
# Commenting out ABSL_LTS_RELEASE_VERSION and ABSL_LTS_RELEASE_PATCH_LEVEL
# prevents code that checks those macros from treating our modified build as
# the canonical abseil LTS release. This avoids version-check mismatches when
# our customized abseil is used alongside Unreal's bundled abseil.
vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h"
"#define ABSL_LTS_RELEASE_VERSION 20260107"
"//#define ABSL_LTS_RELEASE_VERSION 20260107")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h"
"#define ABSL_LTS_RELEASE_PATCH_LEVEL 1"
"//#define ABSL_LTS_RELEASE_PATCH_LEVEL 1")

# -----------------------------------------------------------------------------
# CUSTOMIZATION 4: Disable std::ordering alias (requires C++20 library)
# -----------------------------------------------------------------------------
# ABSL_OPTION_USE_STD_ORDERING defaults to 2 (auto-detect), which enables the
# alias to std::partial_ordering / std::strong_ordering / std::weak_ordering
# when the compiler reports C++20 support. The Android NDK bundled with Unreal
# Engine supports C++20 language features but has incomplete C++20 *library*
# support, so std::ordering types may be unavailable. We force this to 0 to
# always use abseil's own ordering implementation.
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h"
"#define ABSL_OPTION_USE_STD_ORDERING 2"
"#define ABSL_OPTION_USE_STD_ORDERING 0")

# -----------------------------------------------------------------------------
# CUSTOMIZATION 5: Fix C++20 three-way comparison check in cord.h (NDK r25)
# -----------------------------------------------------------------------------
# Android NDK r25 defines __cpp_impl_three_way_comparison (indicating compiler
# support for C++20 three-way comparison syntax) but does not define
# __cpp_lib_three_way_comparison (indicating standard library support). Abseil's
# cord.h guards C++20 comparison code with __cpp_impl_three_way_comparison,
# which causes a build failure on NDK r25 when the library support is missing.
# We replace the guard with the library feature macro, which is the correct
# check. See: https://github.com/abseil/abseil-cpp/pull/1728
# NOTE: This patch has already been applied upstream to time.h; only cord.h
# still requires it as of abseil 20260107.1.
vcpkg_replace_string("${SOURCE_PATH}/absl/strings/cord.h"
"__cpp_impl_three_way_comparison"
"__cpp_lib_three_way_comparison")

set(ABSL_STATIC_RUNTIME_OPTION "")
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static")
set(ABSL_STATIC_RUNTIME_OPTION "-DABSL_MSVC_STATIC_RUNTIME=ON")
endif()

# Don't let Abseil clobber our CMAKE_MSVC_RUNTIME_LIBRARY choice.
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL\")" "#set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL\")")

# Don't let our customized version of Abseil pose as the real thing.
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722_cesium_for_unreal")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_ANY 2" "ABSL_OPTION_USE_STD_ANY 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_OPTIONAL 2" "ABSL_OPTION_USE_STD_OPTIONAL 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_STRING_VIEW 2" "ABSL_OPTION_USE_STD_STRING_VIEW 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_VARIANT 2" "ABSL_OPTION_USE_STD_VARIANT 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_ORDERING 2" "ABSL_OPTION_USE_STD_ORDERING 0")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h" "#define ABSL_LTS_RELEASE_VERSION 20240722" "//#define ABSL_LTS_RELEASE_VERSION 20240722")
vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h" "#define ABSL_LTS_RELEASE_PATCH_LEVEL 0" "//#define ABSL_LTS_RELEASE_PATCH_LEVEL 0")

# Apply this patch to fix C++20 build with Android NDK r25
# https://github.com/abseil/abseil-cpp/pull/1728
vcpkg_replace_string("${SOURCE_PATH}/absl/time/time.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison")
vcpkg_replace_string("${SOURCE_PATH}/absl/strings/cord.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison")

set(ABSL_MINGW_OPTIONS "")
if(VCPKG_TARGET_IS_MINGW)
# LIBRT-NOTFOUND is needed since the system librt may be found by cmake in
# a cross-compile setup.
# See https://github.com/pywinrt/pywinrt/pull/83 for the FIReference
# definition issue.
set(ABSL_MINGW_OPTIONS "-DLIBRT=LIBRT-NOTFOUND"
"-DCMAKE_CXX_FLAGS=-D____FIReference_1_boolean_INTERFACE_DEFINED__")
# Specify ABSL_BUILD_MONOLITHIC_SHARED_LIBS=ON when VCPKG_LIBRARY_LINKAGE is dynamic to match Abseil's Windows (MSVC) defaults
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_list(APPEND ABSL_MINGW_OPTIONS "-DABSL_BUILD_MONOLITHIC_SHARED_LIBS=ON")
endif()
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
# Build abseil with C++17 rather than the upstream default of ON
# (propagate whatever standard the consumer uses). Unreal Engine uses
# C++20, but its Android NDK has incomplete C++20 library support.
# Building with C++17 avoids C++20 library dependencies in abseil's
# own compiled code. ABSL_PROPAGATE_CXX_STD=OFF prevents abseil from
# propagating a C++ standard requirement to consumers via
# target_compile_features, since Unreal controls its own standard.
-DABSL_PROPAGATE_CXX_STD=OFF
-DCMAKE_CXX_STANDARD=14
${ABSL_USE_CXX17_OPTION}
-DCMAKE_CXX_STANDARD=17
-DABSL_BUILD_TESTING=OFF
-DABSL_BUILD_TEST_HELPERS=OFF
${ABSL_TEST_HELPERS_OPTIONS}
${ABSL_STATIC_RUNTIME_OPTION}
${ABSL_MINGW_OPTIONS}
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME absl CONFIG_PATH lib/cmake/absl)

if(VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_OSX)
file(APPEND "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/absl_time.pc" "Libs.private: -framework CoreFoundation\n")
if(NOT VCPKG_BUILD_TYPE)
file(APPEND "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/absl_time.pc" "Libs.private: -framework CoreFoundation\n")
endif()
endif()
vcpkg_fixup_pkgconfig()

vcpkg_copy_pdbs()
Expand Down
9 changes: 2 additions & 7 deletions extern/vcpkg-overlays/abseil/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "abseil",
"version": "20240722.0-cesium-for-unreal",
"version": "20260107.1-cesium-for-unreal",
"description": [
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.",
"In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.",
Expand All @@ -17,10 +17,5 @@
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"cxx17": {
"description": "Enable compiler C++17."
}
}
]
}
50 changes: 0 additions & 50 deletions extern/vcpkg-overlays/blend2d/portfile.cmake

This file was deleted.

4 changes: 0 additions & 4 deletions extern/vcpkg-overlays/blend2d/usage

This file was deleted.

34 changes: 0 additions & 34 deletions extern/vcpkg-overlays/blend2d/vcpkg.json

This file was deleted.

20 changes: 16 additions & 4 deletions extern/vcpkg-overlays/sqlite3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
cmake_minimum_required(VERSION 3.10)

project(sqlite3 C)
project(sqlite3 C CXX)

option(WITH_ZLIB "Build sqlite3 with zlib support" OFF)
option(SQLITE3_SKIP_TOOLS "Disable build sqlite3 executable" OFF)

set(PKGCONFIG_LIBS_PRIVATE "")
set(PKGCONFIG_REQUIRES_PRIVATE "")

add_library(sqlite3 sqlite3.c sqlite3.rc)

Expand Down Expand Up @@ -45,11 +46,17 @@ if (NOT WIN32)
endif()
endif()

if(SQLITE_ENABLE_ICU)
find_package(ICU COMPONENTS uc i18n REQUIRED)
target_link_libraries(sqlite3 PRIVATE ICU::uc ICU::i18n)

string(APPEND PKGCONFIG_REQUIRES_PRIVATE " icu-uc icu-i18n")
endif()

if(NOT SQLITE3_SKIP_TOOLS)
add_executable(sqlite3-bin shell.c)
set_target_properties(sqlite3-bin PROPERTIES
OUTPUT_NAME sqlite3
PDB_NAME "sqlite3${CMAKE_EXECUTABLE_SUFFIX}.pdb"
RUNTIME_OUTPUT_NAME sqlite3
)

target_link_libraries(sqlite3-bin PRIVATE sqlite3)
Expand All @@ -59,7 +66,12 @@ if(NOT SQLITE3_SKIP_TOOLS)
target_compile_definitions(sqlite3-bin PRIVATE SQLITE_HAVE_ZLIB)
endif()

install(TARGETS sqlite3-bin sqlite3
find_library(HAVE_LIBM m)
if(HAVE_LIBM)
target_link_libraries(sqlite3-bin PRIVATE m)
endif()

install(TARGETS sqlite3-bin
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
Expand Down
Loading
Loading