From 00db408c6df84d2a5291b8e95490d8c4077b9d45 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 7 Nov 2024 15:09:50 +1100 Subject: [PATCH] Modify STB to avoid conflict with UE 5.4. --- extern/vcpkg-overlays/stb/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extern/vcpkg-overlays/stb/portfile.cmake b/extern/vcpkg-overlays/stb/portfile.cmake index f449804f7..5f3935029 100644 --- a/extern/vcpkg-overlays/stb/portfile.cmake +++ b/extern/vcpkg-overlays/stb/portfile.cmake @@ -14,3 +14,6 @@ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION " file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") + +# Even when told to create static symbols, STB creates two symbols globally, which breaks packaging in UE 5.4. Fix that. +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/stb_image_resize2.h" "STBIR__SIMDI_CONST(stbir__s" "STBIRDEF STBIR__SIMDI_CONST(stbir__s")