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

[libmysql] Fix libmysql export static library error #31368

Merged
merged 6 commits into from
May 15, 2023
Merged

[libmysql] Fix libmysql export static library error #31368

merged 6 commits into from
May 15, 2023

Conversation

jimwang118
Copy link
Contributor

@jimwang118 jimwang118 commented May 10, 2023

Fixes #30885
Fix the error of libmysql exporting static library and cause poco installation issue.

CMake Error at F:/vcpkg/installed/x64-windows-static/share/unofficial-libmysql/unofficial-libmysql-targets.cmake:84 (message):
  The imported target "libmysql" references the file

     "F:/vcpkg/installed/x64-windows-static/debug/lib/libmysql.lib"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "F:/vcpkg/installed/x64-windows-static/share/unofficial-libmysql/unofficial-libmysql-targets.cmake"

  but not all the files it references.

Modify the libmysql port to export mysqlclient.lib during static compilation, and export libmysql.dll during dynamic compilation.

The usage and feature has been tested successfully locally.

find_package(Poco REQUIRED COMPONENTS CppParser)
target_link_libraries(main PRIVATE Poco::CppParser)
  • 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.
  • 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.

@jimwang118 jimwang118 added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels May 10, 2023
@jimwang118 jimwang118 changed the title [poco] Fix the issue that the libmysq library cannot be found [poco] Fix the issue that the libmysql library cannot be found May 10, 2023
@jimwang118 jimwang118 marked this pull request as ready for review May 11, 2023 05:51
@jimwang118 jimwang118 changed the title [poco] Fix the issue that the libmysql library cannot be found [libmysql] Fix libmysql export static library error May 15, 2023
@LilyWangLL LilyWangLL added the info:reviewed Pull Request changes follow basic guidelines label May 15, 2023
@JavierMatosD JavierMatosD merged commit e98d2f2 into microsoft:master May 15, 2023
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:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[poco] build failure
3 participants