-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tidy-html5] cmake find_package() support #41258
Conversation
@microsoft-github-policy-service agree |
list ( APPEND add_LIBS ${name} ) | ||
endif () | ||
-install(TARGETS ${name} | ||
+install(TARGETS ${name} EXPORT tidy-html5Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+install(TARGETS ${name} EXPORT tidy-html5Config | |
+install(TARGETS ${name} EXPORT unofficial-tidy-html5Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can refer to this document to add CMake exports in unofficial namespaces https://github.com/microsoft/vcpkg-docs/blob/38e5ded0a49722b467ddfa1c75363c41d5107a0f/vcpkg/contributing/maintainer-guide.md#add-cmake-exports-in-an-unofficial--namespace
COMPILE_FLAGS "-DBUILD_SHARED_LIB -DBUILDING_SHARED_LIB") | ||
- install(TARGETS ${name} | ||
+ target_include_directories( ${name} PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>) | ||
+ install(TARGETS ${name} EXPORT tidy-html5Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ install(TARGETS ${name} EXPORT tidy-html5Config | |
+ install(TARGETS ${name} EXPORT unofficial-tidy-html5Config |
+#------------------------------------------------------------------------ | ||
+# CMake FIND_PACKAGE() Support | ||
+#------------------------------------------------------------------------ | ||
+install(EXPORT tidy-html5Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+install(EXPORT tidy-html5Config | |
+install(EXPORT unofficial-tidy-html5Config |
+#------------------------------------------------------------------------ | ||
+install(EXPORT tidy-html5Config | ||
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/tidy-html5 | ||
+ NAMESPACE tidy-html5::) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ NAMESPACE tidy-html5::) | |
+ NAMESPACE unofficial::tidy-html5::) |
+# CMake FIND_PACKAGE() Support | ||
+#------------------------------------------------------------------------ | ||
+install(EXPORT tidy-html5Config | ||
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/tidy-html5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/tidy-html5 | |
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/unofficial-tidy-html5 |
ports/tidy-html5/portfile.cmake
Outdated
@@ -21,6 +22,7 @@ vcpkg_cmake_configure( | |||
) | |||
vcpkg_cmake_install() | |||
vcpkg_fixup_pkgconfig() | |||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/tidy-html5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/tidy-html5) | |
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/unofficial-tidy-html5) |
No usage is provided after installation
|
I didn't test this PR, but I see different target install commands for static vs. shared. |
The "supports" clause reflects platforms that may be fixed by this new version.Any fixed CI baseline entries are removed from that file.Any patches that are no longer applied are deleted from the port's directory."port-version"
is reset (removed fromvcpkg.json
)../vcpkg x-add-version --all
and committing the result.