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

[mozjpeg] fix build #12118

Merged
merged 7 commits into from
Jul 31, 2020
Merged

[mozjpeg] fix build #12118

merged 7 commits into from
Jul 31, 2020

Conversation

saucecontrol
Copy link
Contributor

@saucecontrol saucecontrol commented Jun 26, 2020

This fixes multiple build/install issues in current mozjpeg port

What does your PR fix?

Adds dependency for libpng, which resolves the following error on -static triplets:

CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) (Required is at least version "1.6")
Call Stack (most recent call first):
  C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.17/Modules/FindPNG.cmake:156 (find_package_handle_standard_args)
  C:/git/vcpkg/scripts/buildsystems/vcpkg.cmake:331 (_find_package)
  CMakeLists.txt:670 (find_package)

Fixes invalid use of vcpkg_copy_tools, which resolves the following error:

CMake Error at scripts/cmake/vcpkg_copy_tools.cmake:32 (message):
  TOOL_NAMES must be specified.
Call Stack (most recent call first):
  ports/mozjpeg/portfile.cmake:40 (vcpkg_copy_tools)
  scripts/ports.cmake:73 (include)

Fixes a typo in the CMake options that led to both static and dynamic outputs in -static triplets.

Renames the lib files to remove -static from the file names, as is done for libjpeg-turbo.

Adds pkgconfig fixups.

Cleans up patch to make only minimal changes.

Which triplets are supported/not supported? Have you updated the CI baseline?

Tested with

  • x86-windows
  • x86-windows-static
  • x64-windows
  • x64-windows-static
  • x64-linux

Updated CI baseline to enable these triplets

Does your PR follow the maintainer guide?

Looks like it

@ghost
Copy link

ghost commented Jun 26, 2020

CLA assistant check
All CLA requirements met.

@saucecontrol
Copy link
Contributor Author

Build worked in CI but conflicts with libjpeg-turbo. I've re-disabled them in CI and added a comment to explain why they're skipped.

@LilyWangL LilyWangL added 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 labels Jun 29, 2020
@strega-nil
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@strega-nil strega-nil merged commit 3513e92 into microsoft:master Jul 31, 2020
@saucecontrol saucecontrol deleted the mozjpeg branch July 31, 2020 05:44
hellozee pushed a commit to hellozee/vcpkg that referenced this pull request Sep 11, 2020
* fix mozjpeg build

* re-disable in CI baseline

* fix static install

* rename static libs, add pkgconfig fixup

* update version string

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
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.

None yet

6 participants