Skip to content

Commit

Permalink
[rmlui] Update to version 6.0 (microsoft#40666)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikke89 authored Aug 28, 2024
1 parent a747ea2 commit f5ec6f3
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 178 deletions.
63 changes: 30 additions & 33 deletions ports/rmlui/add-robin-hood.patch
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
diff --git a/CMake/FileList.cmake b/CMake/FileList.cmake
index cd2918a7..f063a879 100644
--- a/CMake/FileList.cmake
+++ b/CMake/FileList.cmake
@@ -123,7 +123,6 @@ set(Core_PUB_HDR_FILES
${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ComputedValues.h
${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/itlib/flat_map.hpp
${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/itlib/flat_set.hpp
- ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/robin_hood.h
${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Context.h
${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ContextInstancer.h
${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ConvolutionFilter.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b552524..190e8c8e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -427,6 +427,8 @@ if( ENABLE_SVG_PLUGIN )
message("-- Can SVG plugin be enabled - yes - lunasvg library found")
endif()

+find_path(ROBIN_HOOD_INCLUDE_DIR robin_hood.h)
+include_directories(${ROBIN_HOOD_INCLUDE_DIR})

if(NOT BUILD_FRAMEWORK)
#===================================
diff --git a/Include/RmlUi/Config/Config.h b/Include/RmlUi/Config/Config.h
index 018ab3b1..4bc20613 100644
index 15d984a3..019db32c 100644
--- a/Include/RmlUi/Config/Config.h
+++ b/Include/RmlUi/Config/Config.h
@@ -57,7 +57,7 @@
#else
#include "../Core/Containers/itlib/flat_map.hpp"
#include "../Core/Containers/itlib/flat_set.hpp"
-#include "../Core/Containers/robin_hood.h"
+#include <robin_hood.h>
#endif // RMLUI_NO_THIRDPARTY_CONTAINERS
@@ -58,7 +58,7 @@
#else
#include "../Core/Containers/itlib/flat_map.hpp"
#include "../Core/Containers/itlib/flat_set.hpp"
- #include "../Core/Containers/robin_hood.h"
+ #include <robin_hood.h>
#endif // RMLUI_NO_THIRDPARTY_CONTAINERS

namespace Rml {
diff --git a/Source/Core/CMakeLists.txt b/Source/Core/CMakeLists.txt
index c377ff49..7dff6a07 100644
--- a/Source/Core/CMakeLists.txt
+++ b/Source/Core/CMakeLists.txt
@@ -233,7 +233,6 @@ target_sources(rmlui_core PRIVATE
"${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ComputedValues.h"
"${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/itlib/flat_map.hpp"
"${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/itlib/flat_set.hpp"
- "${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Containers/robin_hood.h"
"${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Context.h"
"${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ContextInstancer.h"
"${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ConvolutionFilter.h"
@@ -379,6 +378,9 @@ elseif(rmlui_core_TYPE STREQUAL "SHARED_LIBRARY")
endif()
unset(rmlui_core_TYPE)

+find_path(ROBIN_HOOD_INCLUDE_DIR robin_hood.h)
+target_include_directories(rmlui_core PUBLIC ${ROBIN_HOOD_INCLUDE_DIR})
+
if(RMLUI_FONT_ENGINE STREQUAL "freetype")
# Include the source files for the default font engine.
add_subdirectory("FontEngineDefault")
34 changes: 23 additions & 11 deletions ports/rmlui/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,43 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mikke89/RmlUi
REF ${VERSION}
SHA512 06bf1a24c6ff3f164ef1af80186d5f974e6a5467f6f0d50ec33bb14516e4899321fe7a5b9c4912def908a53711bf302bc782cf78117e0930862f5d1ad07dec18
SHA512 46a8fef450ab6eaf6d4d6a2fff9b23dbe5a7ae81720cfa29f116f9454daca5fe80bef0b9981e037e6a42718a21361a0ca2380d0ebe33bf5e744aeecc033724b5
HEAD_REF master
PATCHES
add-robin-hood.patch
remove-std-before-uint.patch
skip-custom-find-modules.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
lua BUILD_LUA_BINDINGS
INVERTED_FEATURES
freetype NO_FONT_INTERFACE_DEFAULT
FEATURES
lua RMLUI_LUA_BINDINGS
)

if("freetype" IN_LIST FEATURES)
set(RMLUI_FONT_ENGINE "freetype")
else()
set(RMLUI_FONT_ENGINE "none")
endif()

# Remove built-in header, instead we use vcpkg version (from robin-hood-hashing port)
file(REMOVE "${SOURCE_PATH}/Include/RmlUi/Core/Containers/robin_hood.h")

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
${FEATURE_OPTIONS}
"-DRMLUI_FONT_ENGINE=${RMLUI_FONT_ENGINE}"
"-DRMLUI_COMPILER_OPTIONS=OFF"
"-DRMLUI_INSTALL_RUNTIME_DEPENDENCIES=OFF"
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/RmlUi/cmake)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/RmlUi)
vcpkg_copy_pdbs()

file(REMOVE_RECURSE
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/lib/RmlUi"
"${CURRENT_PACKAGES_DIR}/lib/RmlUi"
"${CURRENT_PACKAGES_DIR}/debug/share"
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
Expand All @@ -52,4 +58,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endif()
endif()

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
vcpkg_install_copyright(
FILE_LIST
"${SOURCE_PATH}/LICENSE.txt"
"${SOURCE_PATH}/Include/RmlUi/Core/Containers/LICENSE.txt"
"${SOURCE_PATH}/Source/Debugger/LICENSE.txt"
)
130 changes: 0 additions & 130 deletions ports/rmlui/remove-std-before-uint.patch

This file was deleted.

27 changes: 27 additions & 0 deletions ports/rmlui/skip-custom-find-modules.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/CMake/RmlUiConfig.cmake.in b/CMake/RmlUiConfig.cmake.in
index a69348fd..9d758860 100644
--- a/CMake/RmlUiConfig.cmake.in
+++ b/CMake/RmlUiConfig.cmake.in
@@ -27,8 +27,6 @@ macro(report_dependency_found_or_error friendly_name target_name)
message(STATUS "Found ${friendly_name} target ${target_name}${success_message}")
endmacro()

-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Modules")
-
include("${CMAKE_CURRENT_LIST_DIR}/Dependencies.cmake")

include("${CMAKE_CURRENT_LIST_DIR}/RmlUiTargets.cmake")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f13434fc..2aef42fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,9 +189,6 @@ install(FILES
DESTINATION
"${RMLUI_INSTALL_TARGETS_DIR}"
)
-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Modules"
- DESTINATION "${RMLUI_INSTALL_TARGETS_DIR}"
-)

if(RMLUI_IS_ROOT_PROJECT)
# Export build tree targets if RmlUi is the top-level project.
4 changes: 4 additions & 0 deletions ports/rmlui/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rmlui provides CMake targets:

find_package(RmlUi CONFIG REQUIRED)
target_link_libraries(main PRIVATE RmlUi::RmlUi)
3 changes: 1 addition & 2 deletions ports/rmlui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "rmlui",
"version": "5.1",
"port-version": 1,
"version": "6.0",
"maintainers": "Michael R. P. Ragazzon <[email protected]>",
"description": "RmlUi is the C++ user interface library based on the HTML and CSS standards, designed as a complete solution for any project's interface needs.",
"homepage": "https://github.com/mikke89/RmlUi",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7857,8 +7857,8 @@
"port-version": 0
},
"rmlui": {
"baseline": "5.1",
"port-version": 1
"baseline": "6.0",
"port-version": 0
},
"rmqcpp": {
"baseline": "1.0.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/r-/rmlui.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "845eceb8c79319709a6bee36adacb6b58ab81a05",
"version": "6.0",
"port-version": 0
},
{
"git-tree": "cef931b140aa6e09bed6aa57445d5f726ba2bd8b",
"version": "5.1",
Expand Down

0 comments on commit f5ec6f3

Please sign in to comment.