Skip to content

Commit

Permalink
Merge pull request #539 from CesiumGS/abseil-configure-order
Browse files Browse the repository at this point in the history
Fix linker errors by replacing strings in Abseil source before running cmake configure
  • Loading branch information
kring authored Jan 1, 2025
2 parents 0d8f0e0 + 5cc5725 commit 5ca9a02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Fixed a bug that could cause a crash on AppDomain reloads.
- Fixed a bug that could cause a crash or incorrect textures when multiple `Cesium3DTileset` tiles referenced the same image by URL.
- Fixed a bug in the Abseil vcpkg overlay port that could cause linker errors on some systems.

## v1.14.0 - 2024-12-02

Expand Down
20 changes: 10 additions & 10 deletions native~/vcpkg/ports/abseil/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ 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\")")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DABSL_PROPAGATE_CXX_STD=OFF
-DCMAKE_CXX_STANDARD=14
${ABSL_USE_CXX17_OPTION}
${ABSL_STATIC_RUNTIME_OPTION}
)

# 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")
Expand All @@ -52,6 +42,16 @@ vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h" "#define ABSL_LTS_RELEA
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")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DABSL_PROPAGATE_CXX_STD=OFF
-DCMAKE_CXX_STANDARD=14
${ABSL_USE_CXX17_OPTION}
${ABSL_STATIC_RUNTIME_OPTION}
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME absl CONFIG_PATH lib/cmake/absl)
vcpkg_fixup_pkgconfig()
Expand Down

0 comments on commit 5ca9a02

Please sign in to comment.