-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[libjpeg-turbo] Update wrapper to correctly find debug/release variant #19319
Changes from all commits
1e4770e
5dd589f
f00d1f9
64aca75
c5e2eb2
2de6252
ccfe2c0
0af7001
6bf72e3
1be391d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
find_path(JPEG_INCLUDE_DIR NAMES jpeglib.h PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" NO_DEFAULT_PATH) | ||
find_library(JPEG_LIBRARY_RELEASE NAMES jpeg PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH) | ||
find_library(JPEG_LIBRARY_DEBUG NAMES jpeg PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) | ||
if(NOT JPEG_INCLUDE_DIR OR NOT JPEG_LIBRARY_RELEASE OR (NOT JPEG_LIBRARY_DEBUG AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib")) | ||
message(FATAL_ERROR "Broken installation of vcpkg port libjpeg-turbo") | ||
endif() | ||
Comment on lines
+4
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This check is broken (and it broke for me). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, but... My next PR for libjpeg-turbo is still waiting for #19034 to be merged. Cf. also #19034 (comment) from Sep 13. |
||
if(CMAKE_VERSION VERSION_LESS 3.12) | ||
include(SelectLibraryConfigurations) | ||
select_library_configurations(JPEG) | ||
unset(JPEG_FOUND) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you unsetting? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm interesting does this influence https://cmake.org/cmake/help/latest/prop_gbl/PACKAGES_FOUND.html? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if cmake fixes it now, it doesn't help for cmake wrappers because it will need a policy, and it won't be available for old cmake versions. It es easier to stay with an unconditional |
||
endif() | ||
_find_package(${ARGS}) | ||
if(JPEG_FOUND AND NOT TARGET JPEG::JPEG) | ||
# Backfill JPEG::JPEG to versions of cmake before 3.12 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "libjpeg-turbo", | ||
"version": "2.0.6", | ||
"port-version": 1, | ||
"description": "libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems.", | ||
"homepage": "https://github.com/libjpeg-turbo/libjpeg-turbo", | ||
"features": { | ||
"jpeg7": { | ||
"description": "Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward-incompatible with libjpeg v6b!)" | ||
}, | ||
"jpeg8": { | ||
"description": "Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward-incompatible with libjpeg v6b!)" | ||
} | ||
} | ||
} |
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.
Just include all names you know of or the port will probably have in the future. There is no harm done.
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.
I would prefer to see the wrapper being maintained to closely match the actual installation, not to list names the port "will probably have in the future".