diff --git a/ports/tidy-html5/cmake_find_package_support.patch b/ports/tidy-html5/cmake_find_package_support.patch
new file mode 100644
index 0000000000..9c03d5e3e3
--- /dev/null
+++ b/ports/tidy-html5/cmake_find_package_support.patch
@@ -0,0 +1,43 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8efec25..3fedb02 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -407,10 +407,12 @@ else ()
+ OUTPUT_NAME ${LIB_NAME} )
+
+ endif ()
++set_target_properties(${name} PROPERTIES EXPORT_NAME tidy)
++target_include_directories( ${name} PUBLIC $)
+ if (NOT TIDY_CONSOLE_SHARED) # user wants default static linkage
+ list ( APPEND add_LIBS ${name} )
+ endif ()
+-install(TARGETS ${name}
++install(TARGETS ${name} EXPORT unofficial-tidy-html5Config
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+@@ -440,7 +442,9 @@ if (BUILD_SHARED_LIB)
+ NO_SONAME ${NO_SONAME} )
+ set_target_properties( ${name} PROPERTIES
+ COMPILE_FLAGS "-DBUILD_SHARED_LIB -DBUILDING_SHARED_LIB")
+- install(TARGETS ${name}
++ set_target_properties(${name} PROPERTIES EXPORT_NAME tidy)
++ target_include_directories( ${name} PUBLIC $)
++ install(TARGETS ${name} EXPORT unofficial-tidy-html5Config
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+@@ -450,6 +454,13 @@ if (BUILD_SHARED_LIB)
+ endif ()
+ endif ()
+
++#------------------------------------------------------------------------
++# CMake FIND_PACKAGE() Support
++#------------------------------------------------------------------------
++install(EXPORT unofficial-tidy-html5Config
++ DESTINATION ${LIB_INSTALL_DIR}/cmake/unofficial-tidy-html5
++ NAMESPACE unofficial::tidy-html5::)
++
+
+ #------------------------------------------------------------------------
+ # Main Executable
diff --git a/ports/tidy-html5/portfile.cmake b/ports/tidy-html5/portfile.cmake
index 298bec5834..c6b9486bb2 100644
--- a/ports/tidy-html5/portfile.cmake
+++ b/ports/tidy-html5/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
static-vs-shared.patch
debug-postfix.patch
fix_unsupport_func_uwp.patch
+ cmake_find_package_support.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIB)
@@ -21,6 +22,7 @@ vcpkg_cmake_configure(
)
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
+vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-tidy-html5 CONFIG_PATH lib/cmake/unofficial-tidy-html5)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
diff --git a/ports/tidy-html5/vcpkg.json b/ports/tidy-html5/vcpkg.json
index 203fd8c77a..9d9eefd02f 100644
--- a/ports/tidy-html5/vcpkg.json
+++ b/ports/tidy-html5/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "tidy-html5",
"version": "5.8.0",
- "port-version": 1,
+ "port-version": 2,
"description": "Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools.",
"homepage": "https://www.html-tidy.org",
"license": null,
@@ -9,6 +9,10 @@
{
"name": "vcpkg-cmake",
"host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
}
]
}
diff --git a/versions/baseline.json b/versions/baseline.json
index b6eec533e6..108ab3ff60 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -8862,7 +8862,7 @@
},
"tidy-html5": {
"baseline": "5.8.0",
- "port-version": 1
+ "port-version": 2
},
"tiff": {
"baseline": "4.6.0",
diff --git a/versions/t-/tidy-html5.json b/versions/t-/tidy-html5.json
index 3b1e9c3b4b..4838d667ec 100644
--- a/versions/t-/tidy-html5.json
+++ b/versions/t-/tidy-html5.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "24f53a11ec9d660daf1819fe37d6377d927695a0",
+ "version": "5.8.0",
+ "port-version": 2
+ },
{
"git-tree": "3ff916aaab30ac5a85e702ab9cf4e8092db79477",
"version": "5.8.0",