Repository: conan-io/conan-center-index

Issue:
[package] rmlui/4.4: option `font_interface` not correctly passed to cmake
### Description

https://github.com/conan-io/conan-center-index/blob/master/recipes/rmlui/4.x/conanfile.py#L109

`self.options.font_interface` is of type `conans.model.options.PackageOption` and is therefor never `None`

Setting font_interface to None will cause the build to fail, because even though the freetype dependency is omitted (correctly so), the required variable in CMake is set to "False"

Any easy fix is to change this to

```cmake
self._cmake.definitions["NO_FONT_INTERFACE_DEFAULT"] = not self.options.font_interface
```

### Package and Environment Details

* Package Name/Version: **rmlui/4.4**
* Operating System+version: **Linux PopOs 22.04**
* Compiler+version: **GCC 12**
* Conan version: **conan 1.56.0**
* Python version: **Python 3.10.6**


### Conan profile

[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=gcc
compiler.cppstd=23
compiler.libcxx=libstdc++11
compiler.version=12
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
CC=/usr/bin/gcc-12
CXX=/usr/bin/g++-12
[conf]
tools.build:skip_test=False
tools.build:compiler_executables={'cpp': '/usr/bin/g++-12', 'c': '/usr/bin/gcc-12'}


### Steps to reproduce

CONAN_PRINT_RUN_COMMANDS=1 conan install -s build_type=Debug --build=missing -o font_interface=None rmlui/4.4@

### Logs

<details><summary>Click to expand log</summary>

```
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=gcc
compiler.cppstd=23
compiler.libcxx=libstdc++11
compiler.version=12
os=Linux
os_build=Linux
[options]
font_interface=None
[build_requires]
[env]
CC=/usr/bin/gcc-12
CXX=/usr/bin/g++-12
[conf]
tools.build:skip_test=False
tools.build:compiler_executables={'cpp': '/usr/bin/g++-12', 'c': '/usr/bin/gcc-12'}

rmlui/4.4: WARN: Package binary is corrupted, removing: df042c8c79d8bdf2b40f93b08e5d2c301671f914
Installing package: rmlui/4.4
Requirements
    rmlui/4.4 from 'conancenter' - Cache
    robin-hood-hashing/3.11.3 from 'conancenter' - Cache
Packages
    rmlui/4.4:df042c8c79d8bdf2b40f93b08e5d2c301671f914 - Build
    robin-hood-hashing/3.11.3:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
Build requirements
    cmake/3.23.2 from 'conancenter' - Cache
    openssl/1.1.1q from 'arcturus-collective' - Cache
Build requirements packages
    cmake/3.23.2:d236921d4854b1409aaf5c280132cd46839056aa - Cache
    openssl/1.1.1q:d13c97721d7bdc192ca6529684f2b79beeae8a7c - Cache

Installing (downloading, building) binaries...
openssl/1.1.1q: Already installed!
robin-hood-hashing/3.11.3: Already installed!
cmake/3.23.2: Already installed!
cmake/3.23.2: Appending PATH environment variable: /home/----/.conan/data/cmake/3.23.2/_/_/package/d236921d4854b1409aaf5c280132cd46839056aa/bin
rmlui/4.4: Applying build-requirement: cmake/3.23.2
rmlui/4.4: Applying build-requirement: openssl/1.1.1q
rmlui/4.4: WARN: Build folder is dirty, removing it: /home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914
rmlui/4.4: Copying sources to build folder
rmlui/4.4: Building your package in /home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914
rmlui/4.4: Generator cmake_find_package created Findcmake.cmake
rmlui/4.4: Generator cmake_find_package created Findrobin_hood.cmake
rmlui/4.4: Generator cmake_find_package created FindOpenSSL.cmake
rmlui/4.4: Generator cmake created conanbuildinfo.cmake
rmlui/4.4: Aggregating env generators
rmlui/4.4: Calling build()
WARN: replace_in_file didn't find pattern 'FREETYPE_FOUND' in 'source_subfolder/CMakeLists.txt' file.
WARN: replace_in_file didn't find pattern 'FREETYPE_LINK_DIRS' in 'source_subfolder/CMakeLists.txt' file.
WARN: replace_in_file didn't find pattern 'FREETYPE_LIBRARY' in 'source_subfolder/CMakeLists.txt' file.
WARN: replace_in_file didn't find pattern 'LUA_FOUND' in 'source_subfolder/CMakeLists.txt' file.

----Running------
> cd '/home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Debug" -DCONAN_CMAKE_CXX_STANDARD="23" -DCONAN_CMAKE_CXX_EXTENSIONS="OFF" -DCONAN_STD_CXX_FLAG="-std=c++2b" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="12" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/----/.conan/data/rmlui/4.4/_/_/package/df042c8c79d8bdf2b40f93b08e5d2c301671f914" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_MODULE_PATH="/home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DBUILD_LUA_BINDINGS="False" -DBUILD_SAMPLES="False" -DCUSTOM_CONFIGURATION="True" -DCUSTOM_INCLUDE_DIRS="/home/----/.conan/data/robin-hood-hashing/3.11.3/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include" -DDISABLE_RTTI_AND_EXCEPTIONS="False" -DENABLE_PRECOMPILED_HEADERS="True" -DENABLE_TRACY_PROFILING="False" -DMATRIX_ROW_MAJOR="False" -DNO_FONT_INTERFACE_DEFAULT="False" -DNO_THIRDPARTY_CONTAINERS="False" -Wno-dev '/home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914'
-----------------
-- The CXX compiler identification is GNU 12.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-12 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan setting CPP STANDARD: 23 WITH EXTENSIONS OFF
-- Conan: Adjusting fPIC flag (ON)
-- Conan: Compiler GCC>=5, checking major version 12
-- Conan: Checking correct version: 12
-- Conan: C++ stdlib: libstdc++11
-- The C compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-12 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for ANSI scope
-- Check for ANSI scope - found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Check for STD namespace
-- Check for STD namespace - found
-- Building static libraries. Make sure to #define RMLUI_STATIC_LIB before including RmlUi in your project.
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.11.1") 
If you wish to use find_package(RmlUi) in your own project to find RmlUi library please update cmake to version which provides CMakePackageConfighelpers module or write generators for RmlUiConfig.cmake by yourself.
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY


-- Build files have been written to: /home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914

----Running------
> cmake --build '/home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914' '--' '-j8'
-----------------
[  0%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/cmake_pch.hxx.gch
[  2%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Box.cpp.o
[  2%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/BaseXMLParser.cpp.o
[  2%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ComputedValues.cpp.o
[  2%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Context.cpp.o
[  2%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Clock.cpp.o
[  3%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ComputeProperty.cpp.o
[  4%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ContextInstancer.cpp.o
[  4%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ContextInstancerDefault.cpp.o
[  5%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ConvolutionFilter.cpp.o
[  5%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Core.cpp.o
[  6%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataController.cpp.o
[  6%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataControllerDefault.cpp.o
[  7%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataExpression.cpp.o
[  7%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataModel.cpp.o
[  8%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataModelHandle.cpp.o
[  8%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataTypeRegister.cpp.o
[  9%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataVariable.cpp.o
[  9%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataView.cpp.o
[ 10%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DataViewDefault.cpp.o
[ 10%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Decorator.cpp.o
[ 11%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorGradient.cpp.o
[ 11%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorInstancer.cpp.o
[ 12%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorNinePatch.cpp.o
[ 12%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiled.cpp.o
[ 13%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledBox.cpp.o
[ 13%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledBoxInstancer.cpp.o
[ 14%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledHorizontal.cpp.o
[ 14%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledHorizontalInstancer.cpp.o
[ 15%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledImage.cpp.o
[ 15%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledImageInstancer.cpp.o
[ 16%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledInstancer.cpp.o
[ 16%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledVertical.cpp.o
[ 17%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DecoratorTiledVerticalInstancer.cpp.o
[ 17%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/DocumentHeader.cpp.o
[ 18%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Element.cpp.o
[ 18%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementAnimation.cpp.o
[ 19%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementBackgroundBorder.cpp.o
[ 20%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementDefinition.cpp.o
[ 20%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementDecoration.cpp.o
[ 20%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementDocument.cpp.o
[ 21%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementHandle.cpp.o
[ 21%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementInstancer.cpp.o
[ 22%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/DataFormatter.cpp.o
[ 22%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/DataQuery.cpp.o
[ 23%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/DataSource.cpp.o
[ 23%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/DataSourceListener.cpp.o
[ 24%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementDataGrid.cpp.o
[ 24%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementDataGridCell.cpp.o
[ 25%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementDataGridExpandButton.cpp.o
[ 25%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementDataGridRow.cpp.o
[ 26%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementForm.cpp.o
[ 26%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementFormControl.cpp.o
[ 27%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementFormControlDataSelect.cpp.o
[ 27%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementFormControlInput.cpp.o
[ 28%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementFormControlSelect.cpp.o
[ 28%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementFormControlTextArea.cpp.o
[ 29%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementImage.cpp.o
[ 29%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementLabel.cpp.o
[ 30%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementProgress.cpp.o
[ 30%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementTabSet.cpp.o
[ 31%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/ElementTextSelection.cpp.o
[ 31%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/InputType.cpp.o
[ 31%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/InputTypeCheckbox.cpp.o
[ 32%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/InputTypeButton.cpp.o
[ 33%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/InputTypeRadio.cpp.o
[ 33%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/InputTypeRange.cpp.o
[ 34%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/InputTypeSubmit.cpp.o
[ 34%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/InputTypeText.cpp.o
[ 35%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/WidgetDropDown.cpp.o
[ 35%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/WidgetSlider.cpp.o
[ 36%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/WidgetTextInput.cpp.o
[ 36%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/WidgetTextInputMultiLine.cpp.o
[ 37%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/WidgetTextInputSingleLine.cpp.o
[ 37%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/WidgetTextInputSingleLinePassword.cpp.o
[ 38%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/XMLNodeHandlerDataGrid.cpp.o
[ 38%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/XMLNodeHandlerSelect.cpp.o
[ 39%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/XMLNodeHandlerTabSet.cpp.o
[ 39%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Elements/XMLNodeHandlerTextArea.cpp.o
[ 40%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementScroll.cpp.o
[ 40%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementStyle.cpp.o
[ 41%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementText.cpp.o
[ 41%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ElementUtilities.cpp.o
[ 42%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Event.cpp.o
[ 42%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/EventDispatcher.cpp.o
[ 43%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/EventInstancer.cpp.o
[ 43%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/EventInstancerDefault.cpp.o
[ 44%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/EventListenerInstancer.cpp.o
[ 44%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/EventSpecification.cpp.o
[ 45%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Factory.cpp.o
[ 45%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FileInterface.cpp.o
[ 46%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FileInterfaceDefault.cpp.o
[ 46%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEffect.cpp.o
[ 47%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEffectBlur.cpp.o
[ 48%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEffectInstancer.cpp.o
[ 48%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEffectGlow.cpp.o
[ 48%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEffectOutline.cpp.o
[ 49%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEffectShadow.cpp.o
[ 49%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineInterface.cpp.o
[ 50%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Geometry.cpp.o
[ 51%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/GeometryDatabase.cpp.o
[ 51%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/GeometryBackgroundBorder.cpp.o
[ 51%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/GeometryUtilities.cpp.o
[ 52%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutBlockBox.cpp.o
[ 52%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutBlockBoxSpace.cpp.o
[ 53%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutDetails.cpp.o
[ 53%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutEngine.cpp.o
[ 54%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutFlex.cpp.o
[ 54%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutInlineBox.cpp.o
[ 55%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutInlineBoxText.cpp.o
[ 55%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutLineBox.cpp.o
[ 56%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutTable.cpp.o
[ 56%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/LayoutTableDetails.cpp.o
[ 57%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Log.cpp.o
[ 57%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Math.cpp.o
[ 58%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Memory.cpp.o
[ 58%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/ObserverPtr.cpp.o
[ 59%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Plugin.cpp.o
[ 59%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PluginRegistry.cpp.o
[ 60%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Profiling.cpp.o
[ 60%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertiesIteratorView.cpp.o
[ 61%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Property.cpp.o
[ 61%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyDefinition.cpp.o
[ 62%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyDictionary.cpp.o
[ 62%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserAnimation.cpp.o
[ 63%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserColour.cpp.o
[ 63%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserDecorator.cpp.o
[ 64%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserFontEffect.cpp.o
[ 64%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserKeyword.cpp.o
[ 65%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserNumber.cpp.o
[ 65%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserRatio.cpp.o
[ 66%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserString.cpp.o
[ 66%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertyParserTransform.cpp.o
[ 67%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/PropertySpecification.cpp.o
[ 67%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/RenderInterface.cpp.o
[ 68%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Spritesheet.cpp.o
[ 68%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Stream.cpp.o
[ 69%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StreamFile.cpp.o
[ 69%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StreamMemory.cpp.o
[ 70%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StringUtilities.cpp.o
[ 70%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheet.cpp.o
[ 71%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetContainer.cpp.o
[ 72%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNode.cpp.o
[ 72%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetFactory.cpp.o
[ 72%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelector.cpp.o
[ 73%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorEmpty.cpp.o
[ 73%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorFirstChild.cpp.o
[ 74%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorFirstOfType.cpp.o
[ 74%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorLastChild.cpp.o
[ 75%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorLastOfType.cpp.o
[ 75%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorNthChild.cpp.o
[ 76%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorNthLastChild.cpp.o
[ 76%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorNthLastOfType.cpp.o
[ 77%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorNthOfType.cpp.o
[ 77%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorOnlyChild.cpp.o
[ 78%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetNodeSelectorOnlyOfType.cpp.o
[ 78%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetParser.cpp.o
[ 79%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/StyleSheetSpecification.cpp.o
[ 79%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/SystemInterface.cpp.o
[ 80%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Template.cpp.o
[ 81%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Texture.cpp.o
[ 81%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TemplateCache.cpp.o
[ 81%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TextureDatabase.cpp.o
[ 82%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TextureLayout.cpp.o
[ 82%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TextureLayoutRectangle.cpp.o
[ 83%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TextureLayoutRow.cpp.o
[ 83%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TextureLayoutTexture.cpp.o
[ 84%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TextureResource.cpp.o
[ 84%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Transform.cpp.o
[ 85%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TransformPrimitive.cpp.o
[ 85%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TransformState.cpp.o
[ 86%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TransformUtilities.cpp.o
[ 86%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Tween.cpp.o
[ 87%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/TypeConverter.cpp.o
[ 87%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/URL.cpp.o
[ 88%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/Variant.cpp.o
[ 88%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/WidgetScroll.cpp.o
[ 89%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/XMLNodeHandler.cpp.o
[ 89%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/XMLNodeHandlerBody.cpp.o
[ 90%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/XMLNodeHandlerDefault.cpp.o
[ 90%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/XMLNodeHandlerHead.cpp.o
[ 91%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/XMLNodeHandlerTemplate.cpp.o
[ 91%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/XMLParser.cpp.o
[ 92%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/XMLParseTools.cpp.o
[ 92%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineDefault/FontEngineInterfaceDefault.cpp.o
[ 93%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineDefault/FontFace.cpp.o
[ 93%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineDefault/FontFaceHandleDefault.cpp.o
[ 94%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineDefault/FontFaceLayer.cpp.o
[ 94%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineDefault/FontFamily.cpp.o
[ 95%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineDefault/FontProvider.cpp.o
[ 95%] Building CXX object source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineDefault/FreeTypeInterface.cpp.o
/home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914/source_subfolder/Source/Core/FontEngineDefault/FreeTypeInterface.cpp:36:10: fatal error: ft2build.h: No such file or directory
   36 | #include <ft2build.h>
      |          ^~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [source_subfolder/CMakeFiles/RmlCore.dir/build.make:3117: source_subfolder/CMakeFiles/RmlCore.dir/Source/Core/FontEngineDefault/FreeTypeInterface.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:100: source_subfolder/CMakeFiles/RmlCore.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
rmlui/4.4: 
rmlui/4.4: ERROR: Package 'df042c8c79d8bdf2b40f93b08e5d2c301671f914' build failed
rmlui/4.4: WARN: Build folder /home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914
ERROR: rmlui/4.4: Error in build() method, line 148
	self._configure_cmake().build()
	ConanException: Error 2 while executing cmake --build '/home/----/.conan/data/rmlui/4.4/_/_/build/df042c8c79d8bdf2b40f93b08e5d2c301671f914' '--' '-j8'
```

</details>



Discussion:

Resolving patch:
diff --git a/recipes/rmlui/4.x/conanfile.py b/recipes/rmlui/4.x/conanfile.py
--- a/recipes/rmlui/4.x/conanfile.py
+++ b/recipes/rmlui/4.x/conanfile.py
@@ -1,18 +1,23 @@
-from conans import ConanFile, CMake, tools
-from conans.errors import ConanInvalidConfiguration
+from conan import ConanFile
+from conan.errors import ConanInvalidConfiguration
+from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout
+from conan.tools.build import check_min_cppstd
+from conan.tools.files import get, replace_in_file, copy, export_conandata_patches, apply_conandata_patches
 import os
 
 
+required_conan_version = ">=1.53.0"
+
 class RmluiConan(ConanFile):
     name = "rmlui"
     description = "RmlUi - The HTML/CSS User Interface Library Evolved"
-    homepage = "https://github.com/mikke89/RmlUi"
-    url = "https://github.com/conan-io/conan-center-index"
     license = "MIT"
+    url = "https://github.com/conan-io/conan-center-index"
+    homepage = "https://github.com/mikke89/RmlUi"
     topics = ("css", "gui", "html", "lua", "rmlui")
+    package_type = "library"
     settings = "os", "arch", "compiler", "build_type"
     options = {
-        "enable_rtti_and_exceptions": [True, False],
         "font_interface": ["freetype", None],
         "fPIC": [True, False],
         "matrix_mode": ["column_major", "row_major"],
@@ -21,7 +26,6 @@ class RmluiConan(ConanFile):
         "with_thirdparty_containers": [True, False]
     }
     default_options = {
-        "enable_rtti_and_exceptions": True,
         "font_interface": "freetype",
         "fPIC": True,
         "matrix_mode": "column_major",
@@ -29,9 +33,6 @@ class RmluiConan(ConanFile):
         "with_lua_bindings": False,
         "with_thirdparty_containers": True
     }
-    build_requires = ["cmake/3.23.2"]
-    exports_sources = ["CMakeLists.txt"]
-    generators = ["cmake", "cmake_find_package"]
 
     @property
     def _minimum_compilers_version(self):
@@ -49,18 +50,21 @@ def _minimum_compilers_version(self):
     def _minimum_cpp_standard(self):
         return 14
 
+    def export_sources(self):
+        export_conandata_patches(self)
+
     def config_options(self):
         if self.settings.os == "Windows":
             del self.options.fPIC
 
     def configure(self):
         if self.options.shared:
-            del self.options.fPIC
+            self.options.rm_safe("fPIC")
 
     def validate(self):
         if self.settings.compiler.get_safe("cppstd"):
-            tools.check_min_cppstd(self, self._minimum_cpp_standard)
-        
+            check_min_cppstd(self, self._minimum_cpp_standard)
+
         def lazy_lt_semver(v1, v2):
             lv1 = [int(v) for v in v1.split(".")]
             lv2 = [int(v) for v in v2.split(".")]
@@ -70,12 +74,10 @@ def lazy_lt_semver(v1, v2):
         min_version = self._minimum_compilers_version.get(
             str(self.settings.compiler))
         if not min_version:
-            self.output.warn("{} recipe lacks information about the {} compiler support.".format(
-                self.name, self.settings.compiler))
+            self.output.warning(f"{self.ref} recipe lacks information about the {self.settings.compiler} compiler support.")
         else:
             if lazy_lt_semver(str(self.settings.compiler.version), min_version):
-                raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format(
-                    self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version))
+                raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._minimum_cpp_standard} support. The current compiler {self.settings.compiler} {self.settings.compiler.version} does not support it.")
 
     def requirements(self):
         if self.options.font_interface == "freetype":
@@ -85,79 +87,55 @@ def requirements(self):
             self.requires("lua/5.3.5")
 
         if self.options.with_thirdparty_containers:
-            self.requires("robin-hood-hashing/3.11.3")
+            self.requires("robin-hood-hashing/3.11.3", transitive_headers=True)
 
-    @property
-    def _source_subfolder(self):
-        return "source_subfolder"
+    def layout(self):
+        cmake_layout(self, src_folder="src")
 
     def source(self):
-        tools.get(**self.conan_data["sources"][self.version],
-                  destination=self._source_subfolder, strip_root=True)
-
-    def _configure_cmake(self):
-        if not hasattr(self, "_cmake"):
-            self._cmake = CMake(self)
-            self._cmake.definitions["BUILD_LUA_BINDINGS"] = self.options.with_lua_bindings
-            self._cmake.definitions["BUILD_SAMPLES"] = False
-            self._cmake.definitions["CUSTOM_CONFIGURATION"] = True
-            self._cmake.definitions["CUSTOM_INCLUDE_DIRS"] = ";".join(self.deps_cpp_info["robin-hood-hashing"].include_paths)
-            self._cmake.definitions["DISABLE_RTTI_AND_EXCEPTIONS"] = not self.options.enable_rtti_and_exceptions
-            self._cmake.definitions["ENABLE_PRECOMPILED_HEADERS"] = True
-            self._cmake.definitions["ENABLE_TRACY_PROFILING"] = False
-            self._cmake.definitions["MATRIX_ROW_MAJOR"] = self.options.matrix_mode == "row_major"
-            self._cmake.definitions["NO_FONT_INTERFACE_DEFAULT"] = self.options.font_interface is None
-            self._cmake.definitions["NO_THIRDPARTY_CONTAINERS"] = not self.options.with_thirdparty_containers
-
-            self._cmake.configure()
-
-        return self._cmake
+        get(self, **self.conan_data["sources"][self.version],
+                  destination=self.source_folder, strip_root=True)
+
+    def generate(self):
+        tc = CMakeToolchain(self)
+        tc.cache_variables["BUILD_LUA_BINDINGS"] = self.options.with_lua_bindings
+        tc.cache_variables["BUILD_SAMPLES"] = False
+        tc.cache_variables["DISABLE_RTTI_AND_EXCEPTIONS"] = False
+        tc.cache_variables["ENABLE_PRECOMPILED_HEADERS"] = True
+        tc.cache_variables["ENABLE_TRACY_PROFILING"] = False
+        tc.cache_variables["MATRIX_ROW_MAJOR"] = self.options.matrix_mode == "row_major"
+        tc.cache_variables["NO_FONT_INTERFACE_DEFAULT"] = not self.options.font_interface
+        tc.cache_variables["NO_THIRDPARTY_CONTAINERS"] = not self.options.with_thirdparty_containers
+        tc.generate()
+
+        deps = CMakeDeps(self)
+        deps.generate()
 
     def _patch_sources(self):
-        # The *.cmake files that conan generates using cmake_find_package for CMake's find_package to consume use
-        # different variable naming than described in CMake's documentation, thus the need for most of the replacements.
-        # References:
-        #  * https://cmake.org/cmake/help/latest/module/FindFreetype.html
-        #  * https://cmake.org/cmake/help/latest/module/FindLua.html
-        replace_mapping = {
-            "FREETYPE_FOUND": "Freetype_FOUND",
-            "FREETYPE_INCLUDE_DIRS": "Freetype_INCLUDE_DIRS",
-            "FREETYPE_LINK_DIRS": "Freetype_LINK_DIRS",
-            "FREETYPE_LIBRARY": "Freetype_LIBRARIES",
-            "FREETYPE_LIBRARIES": "Freetype_LIBRARIES",
-            "LUA_FOUND": "lua_FOUND",
-            "LUA_INCLUDE_DIR": "lua_INCLUDE_DIR",
-            "LUA_LIBRARIES": "lua_LIBRARIES",
-            # disables the built-in generation of package configuration files
-            "if(PkgHelpers_AVAILABLE)": "if(FALSE)"
-        }
-
-        cmakelists_path = os.path.join(
-            self._source_subfolder, "CMakeLists.txt")
-        for key, value in replace_mapping.items():
-            tools.replace_in_file(cmakelists_path, key, value, strict=False)
+        apply_conandata_patches(self)
 
+        # If we are using robin_hood hashing provided by conan, we need to change its include path
         if self.options.with_thirdparty_containers:
-            config_path = os.path.join(self._source_subfolder,
+            config_path = os.path.join(self.source_folder,
                                        "Include", "RmlUi", "Config", "Config.h")
-            tools.replace_in_file(
-                config_path, "\"../Core/Containers/robin_hood.h\"", "<robin_hood.h>")
+            replace_in_file(
+                self, config_path, "\"../Core/Containers/robin_hood.h\"", "<robin_hood.h>")
 
     def build(self):
         self._patch_sources()
-        self._configure_cmake().build()
+        cmake = CMake(self)
+        cmake.configure()
+        cmake.build()
 
     def package(self):
-        self._configure_cmake().install()
-        self.copy("*LICENSE.txt", dst="licenses", src=self._source_subfolder, excludes=("Samples/*", "Tests/*"))
+        copy(self, pattern="*LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder, excludes=("Samples/*", "Tests/*"))
+        cmake = CMake(self)
+        cmake.install()
 
     def package_info(self):
         if self.options.matrix_mode == "row_major":
             self.cpp_info.defines.append("RMLUI_MATRIX_ROW_MAJOR")
 
-        if not self.options.enable_rtti_and_exceptions:
-            self.cpp_info.defines.append("RMLUI_USE_CUSTOM_RTTI")
-
         if not self.options.shared:
             self.cpp_info.defines.append("RMLUI_STATIC_LIB")
 


Test patch:
diff --git a/recipes/rmlui/4.x/test_package/CMakeLists.txt b/recipes/rmlui/4.x/test_package/CMakeLists.txt
--- a/recipes/rmlui/4.x/test_package/CMakeLists.txt
+++ b/recipes/rmlui/4.x/test_package/CMakeLists.txt
@@ -1,11 +1,8 @@
 cmake_minimum_required(VERSION 3.8)
 project(test_package CXX)
 
-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-conan_basic_setup(TARGETS)
-
 find_package(rmlui REQUIRED CONFIG)
 
 add_executable(${PROJECT_NAME} example.cpp)
-target_compile_Features(${PROJECT_NAME} PRIVATE cxx_std_14)
-target_link_libraries(${PROJECT_NAME} rmlui::rmlui)
+target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
+target_link_libraries(${PROJECT_NAME} PRIVATE rmlui::rmlui)
diff --git a/recipes/rmlui/4.x/test_package/conanfile.py b/recipes/rmlui/4.x/test_package/conanfile.py
--- a/recipes/rmlui/4.x/test_package/conanfile.py
+++ b/recipes/rmlui/4.x/test_package/conanfile.py
@@ -1,11 +1,22 @@
+from conan import ConanFile
+from conan.tools.build import can_run
+from conan.tools.cmake import cmake_layout, CMake
 import os
 
-from conans import ConanFile, CMake, tools
-
 
 class ConanRmluiTestConan(ConanFile):
     settings = "os", "arch", "compiler", "build_type"
-    generators = "cmake", "cmake_find_package_multi"
+    generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
+    test_type = "explicit"
+
+    def requirements(self):
+        self.requires(self.tested_reference_str)
+
+    def configure(self):
+        self.options[self.tested_reference_str].with_thirdparty_containers = True
+
+    def layout(self):
+        cmake_layout(self)
 
     def build(self):
         cmake = CMake(self)
@@ -13,6 +24,6 @@ def build(self):
         cmake.build()
 
     def test(self):
-        if not tools.cross_building(self):
-            bin_path = os.path.join("bin", "test_package")
-            self.run(bin_path, run_environment=True)
+        if can_run(self):
+            bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
+            self.run(bin_path, env="conanrun")
diff --git a/recipes/rmlui/4.x/test_v1_package/CMakeLists.txt b/recipes/rmlui/4.x/test_v1_package/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/recipes/rmlui/4.x/test_v1_package/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.1)
+project(test_package)
+
+include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+conan_basic_setup(TARGETS)
+
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/
+                 ${CMAKE_CURRENT_BINARY_DIR}/test_package/)
+
diff --git a/recipes/rmlui/4.x/test_v1_package/conanfile.py b/recipes/rmlui/4.x/test_v1_package/conanfile.py
new file mode 100644
--- /dev/null
+++ b/recipes/rmlui/4.x/test_v1_package/conanfile.py
@@ -0,0 +1,18 @@
+from conans import ConanFile, CMake, RunEnvironment, tools
+from conan.tools.build import cross_building
+import os
+
+# legacy validation with Conan 1.x
+class ConanRmluiTestV1Conan(ConanFile):
+    settings = "os", "arch", "compiler", "build_type"
+    generators = "cmake", "cmake_find_package_multi"
+
+    def build(self):
+        cmake = CMake(self)
+        cmake.configure()
+        cmake.build()
+
+    def test(self):
+        if not cross_building(self):
+            bin_path = os.path.join("bin", "test_package")
+            self.run(bin_path, run_environment=True)