Skip to content

Commit

Permalink
Replace strings in Abseil source before running cmake configure.
Browse files Browse the repository at this point in the history
This is the same as this change from cesium-unreal:
CesiumGS/cesium-unreal@6a44c2f
  • Loading branch information
kring committed Dec 17, 2024
1 parent 6a86882 commit d6b0a56
Showing 1 changed file with 10 additions and 10 deletions.
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 d6b0a56

Please sign in to comment.