Skip to content
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

Merged
merged 8 commits into from
Oct 2, 2024

Conversation

SuperCodeHero
Copy link
Contributor

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • 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.
  • When updating the upstream version, the "port-version" is reset (removed from vcpkg.json).
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@SuperCodeHero
Copy link
Contributor Author

@SuperCodeHero please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

list ( APPEND add_LIBS ${name} )
endif ()
-install(TARGETS ${name}
+install(TARGETS ${name} EXPORT tidy-html5Config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+install(TARGETS ${name} EXPORT tidy-html5Config
+install(TARGETS ${name} EXPORT unofficial-tidy-html5Config

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ install(TARGETS ${name} EXPORT tidy-html5Config
+ install(TARGETS ${name} EXPORT unofficial-tidy-html5Config

+#------------------------------------------------------------------------
+# CMake FIND_PACKAGE() Support
+#------------------------------------------------------------------------
+install(EXPORT tidy-html5Config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+install(EXPORT tidy-html5Config
+install(EXPORT unofficial-tidy-html5Config

+#------------------------------------------------------------------------
+install(EXPORT tidy-html5Config
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/tidy-html5
+ NAMESPACE tidy-html5::)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ NAMESPACE tidy-html5::)
+ NAMESPACE unofficial::tidy-html5::)

+# CMake FIND_PACKAGE() Support
+#------------------------------------------------------------------------
+install(EXPORT tidy-html5Config
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/tidy-html5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/tidy-html5
+ DESTINATION ${LIB_INSTALL_DIR}/cmake/unofficial-tidy-html5

@@ -21,6 +22,7 @@ vcpkg_cmake_configure(
)
vcpkg_cmake_install()
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/tidy-html5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/tidy-html5)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/unofficial-tidy-html5)

@JonLiu1993 JonLiu1993 added the category:port-bug The issue is with a library, which is something the port should already support label Sep 30, 2024
@JonLiu1993
Copy link
Member

No usage is provided after installation

Total install time: 16 s
tidy-html5 provides pkg-config modules:

  # tidy - HTML syntax checker
  tidy

@dg0yt
Copy link
Contributor

dg0yt commented Oct 1, 2024

I didn't test this PR, but I see different target install commands for static vs. shared.
I would suggest to ensure a convenient uniform exported target name by setting target property EXPORT_NAME tidy on both exported targets.

@JavierMatosD JavierMatosD merged commit 54e7ce0 into microsoft:master Oct 2, 2024
16 checks passed
@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants