diff options
Diffstat (limited to 'vcpkg/ports/rmlui')
| -rw-r--r-- | vcpkg/ports/rmlui/add-itlib-and-robin-hood.patch | 43 | ||||
| -rw-r--r-- | vcpkg/ports/rmlui/portfile.cmake | 68 | ||||
| -rw-r--r-- | vcpkg/ports/rmlui/skip-custom-find-modules.patch | 27 | ||||
| -rw-r--r-- | vcpkg/ports/rmlui/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/rmlui/vcpkg.json | 53 |
5 files changed, 195 insertions, 0 deletions
diff --git a/vcpkg/ports/rmlui/add-itlib-and-robin-hood.patch b/vcpkg/ports/rmlui/add-itlib-and-robin-hood.patch new file mode 100644 index 0000000..7f57113 --- /dev/null +++ b/vcpkg/ports/rmlui/add-itlib-and-robin-hood.patch @@ -0,0 +1,43 @@ +diff --git a/Include/RmlUi/Config/Config.h b/Include/RmlUi/Config/Config.h
+index 15d984a3..ee122353 100644
+--- a/Include/RmlUi/Config/Config.h
++++ b/Include/RmlUi/Config/Config.h
+@@ -56,9 +56,9 @@
+ #include <set>
+ #include <unordered_set>
+ #else
+- #include "../Core/Containers/itlib/flat_map.hpp"
+- #include "../Core/Containers/itlib/flat_set.hpp"
+- #include "../Core/Containers/robin_hood.h"
++ #include <itlib/flat_map.hpp>
++ #include <itlib/flat_set.hpp>
++ #include <robin_hood.h>
+ #endif // RMLUI_NO_THIRDPARTY_CONTAINERS
+
+ namespace Rml {
+diff --git a/Source/Core/CMakeLists.txt b/Source/Core/CMakeLists.txt
+index 336ec979..c68131c8 100644
+--- a/Source/Core/CMakeLists.txt
++++ b/Source/Core/CMakeLists.txt
+@@ -239,9 +239,6 @@ target_sources(rmlui_core PRIVATE
+ "${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Colour.inl"
+ "${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/CompiledFilterShader.h"
+ "${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"
+@@ -390,6 +387,11 @@ 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})
++find_path(ITLIB_INCLUDE_DIRS "itlib/flat_map.hpp")
++target_include_directories(rmlui_core PUBLIC ${ITLIB_INCLUDE_DIRS})
++
+ if(RMLUI_FONT_ENGINE STREQUAL "freetype")
+ # Include the source files for the default font engine.
+ add_subdirectory("FontEngineDefault")
diff --git a/vcpkg/ports/rmlui/portfile.cmake b/vcpkg/ports/rmlui/portfile.cmake new file mode 100644 index 0000000..5830242 --- /dev/null +++ b/vcpkg/ports/rmlui/portfile.cmake @@ -0,0 +1,68 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mikke89/RmlUi
+ REF ${VERSION}
+ SHA512 44a336f1d1d17a71ffccf7456b44c76b9d5e590159f534a62e26378933cdcb4b78bdf5b0f9e9c3a7185c767accde1439f3cc6179b72a4c9901e36d738903a7f1
+ HEAD_REF master
+ PATCHES
+ add-itlib-and-robin-hood.patch
+ skip-custom-find-modules.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ lua RMLUI_LUA_BINDINGS
+ svg RMLUI_SVG_PLUGIN
+ lottie RMLUI_LOTTIE_PLUGIN
+)
+
+if("freetype" IN_LIST FEATURES)
+ set(RMLUI_FONT_ENGINE "freetype")
+else()
+ set(RMLUI_FONT_ENGINE "none")
+endif()
+
+# Remove built-in third-party dependencies (itlib and robin-hood), instead we use vcpkg ports.
+file(REMOVE_RECURSE "${SOURCE_PATH}/Include/RmlUi/Core/Containers")
+
+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/cmake/RmlUi)
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+ "${CURRENT_PACKAGES_DIR}/debug/share"
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/RmlUi/Core/Header.h"
+ "#if !defined RMLUI_STATIC_LIB"
+ "#if 0"
+ )
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/RmlUi/Debugger/Header.h"
+ "#if !defined RMLUI_STATIC_LIB"
+ "#if 0"
+ )
+ if ("lua" IN_LIST FEATURES)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/RmlUi/Lua/Header.h"
+ "#if !defined RMLUI_STATIC_LIB"
+ "#if 0"
+ )
+ endif()
+endif()
+
+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}/Source/Debugger/LICENSE.txt"
+)
diff --git a/vcpkg/ports/rmlui/skip-custom-find-modules.patch b/vcpkg/ports/rmlui/skip-custom-find-modules.patch new file mode 100644 index 0000000..1b53172 --- /dev/null +++ b/vcpkg/ports/rmlui/skip-custom-find-modules.patch @@ -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.
diff --git a/vcpkg/ports/rmlui/usage b/vcpkg/ports/rmlui/usage new file mode 100644 index 0000000..f542f08 --- /dev/null +++ b/vcpkg/ports/rmlui/usage @@ -0,0 +1,4 @@ +rmlui provides CMake targets:
+
+ find_package(RmlUi CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE RmlUi::RmlUi)
diff --git a/vcpkg/ports/rmlui/vcpkg.json b/vcpkg/ports/rmlui/vcpkg.json new file mode 100644 index 0000000..12d4b00 --- /dev/null +++ b/vcpkg/ports/rmlui/vcpkg.json @@ -0,0 +1,53 @@ +{ + "name": "rmlui", + "version": "6.1", + "maintainers": "Michael R. P. Ragazzon <mikke89@users.noreply.github.com>", + "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", + "documentation": "https://mikke89.github.io/RmlUiDoc/", + "license": "MIT", + "dependencies": [ + "itlib", + "robin-hood-hashing", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "freetype" + ], + "features": { + "freetype": { + "description": "Include font engine based on FreeType", + "dependencies": [ + { + "name": "freetype", + "default-features": false + } + ] + }, + "lottie": { + "description": "Enable plugin for lottie animations", + "dependencies": [ + "rlottie" + ] + }, + "lua": { + "description": "Build Lua bindings", + "dependencies": [ + "lua" + ] + }, + "svg": { + "description": "Enable plugin for SVG images", + "dependencies": [ + "lunasvg" + ] + } + } +} |