Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
17ebbab
[libjpeg-turbo] Patch dependencies for 3.2.0
tartanpaint Jul 14, 2026
41fb84e
Fix manifest file formatting
tartanpaint Jul 14, 2026
91a63a5
Update version database
tartanpaint Jul 14, 2026
5f44fec
Updated libjpeg-turbo patch with Pkg-Config fixes
tartanpaint Jul 15, 2026
9be746e
Fix libjpeg-turbo license in manifest
tartanpaint Jul 15, 2026
b666138
Update version database
tartanpaint Jul 15, 2026
1d4b86e
Update with dependency patches from libjpeg-turbo project
tartanpaint Jul 17, 2026
816a4bf
Update version database
tartanpaint Jul 17, 2026
f7ef5cf
Merge branch 'microsoft:master' into libjpeg-turbo-3.2.0-dependencies…
tartanpaint Jul 18, 2026
9dd768c
Patch libfreenect2 FindTurboJPEG.cmake to try to fix CI build
tartanpaint Jul 18, 2026
be1bb27
Expect failures for openslide for x64-windows-static and x64-windows-…
tartanpaint Jul 18, 2026
808b8b5
Bump port version for libfreenect2
tartanpaint Jul 18, 2026
12b63c7
Update version database
tartanpaint Jul 18, 2026
bb02239
Fix format issue
tartanpaint Jul 18, 2026
87954ac
Fix libfreenect2 build with patch from https://github.com/OpenKinect/…
tartanpaint Aug 4, 2026
50c6f20
Update version database
tartanpaint Aug 4, 2026
32ddf85
Merge branch 'microsoft:master' into libjpeg-turbo-3.2.0-dependencies…
tartanpaint Aug 4, 2026
57b099a
Attempt to fix finding libjpeg-turbo and dependencies for libfreenect2
tartanpaint Aug 4, 2026
af1e9e9
Update version database
tartanpaint Aug 4, 2026
4d62c34
Update libfreenect2 to support finding static libjpeg-turbo libs
tartanpaint Aug 6, 2026
8714cb6
Update version database
tartanpaint Aug 6, 2026
9ac1bd8
Merge branch 'microsoft:master' into libjpeg-turbo-3.2.0-dependencies…
tartanpaint Aug 8, 2026
924e41f
Fix libfreenect2 cross compile resource generation with patch from Co…
tartanpaint Aug 17, 2026
b8ebb3b
Update version database
tartanpaint Aug 17, 2026
c396cd1
Remove expected failure for libfreenect2:arm64-windows as this now pa…
tartanpaint Aug 19, 2026
622c0b8
Update libfreenect2 find_libjpegturbo.patch as per review
tartanpaint Aug 19, 2026
fdfabe3
Provide comments referencing specific libjpeg-turbo commits used for …
tartanpaint Aug 19, 2026
63ac7fd
Update version database
tartanpaint Aug 19, 2026
46229a2
Attempt to fix libfreenect2 finding libjpeg-turbo files
tartanpaint Aug 19, 2026
a3fde3e
Update version database
tartanpaint Aug 19, 2026
3df5533
Merge branch 'microsoft:master' into libjpeg-turbo-3.2.0-dependencies…
tartanpaint Aug 19, 2026
863daa7
Try to simplify libfreenect2 FindTurboJPEG patch
tartanpaint Aug 19, 2026
adefe48
Update version database
tartanpaint Aug 19, 2026
5daa276
Merge branch 'master' of https://github.com/microsoft/vcpkg into libj…
tartanpaint Aug 22, 2026
268667a
Consolidate upstream libjpeg-turbo commits in to a single patch file …
tartanpaint Aug 22, 2026
b275109
Update version database
tartanpaint Aug 22, 2026
9944b28
Fix libjpeg-turbo port line endings
tartanpaint Aug 22, 2026
12c6dea
Update version database
tartanpaint Aug 22, 2026
8516d07
Update version database
tartanpaint Aug 22, 2026
9fa31bc
Fix typo in comment
tartanpaint Aug 24, 2026
ad0427e
Update version database
tartanpaint Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ports/libjpeg-turbo/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ vcpkg_from_github(
add-options-for-docs-headers.patch
# workaround for vcpkg bug see #5697 on github for more information
workaround_cmake_system_processor.patch
# apply libjpeg-turbo patches for dependency issues https://github.com/libjpeg-turbo/libjpeg-turbo/issues/901
# This patch file contains changes from the following upstream commits:
# https://github.com/libjpeg-turbo/libjpeg-turbo/commit/95156233739078e7d4de0aeeacc4b0595630f393
# https://github.com/libjpeg-turbo/libjpeg-turbo/commit/240e20d87c0b7d17614687ddc55ccd1fc631daf9
# https://github.com/libjpeg-turbo/libjpeg-turbo/commit/204e5c2bed4401309c26dc6ed95001e2fc50f833
system-dependency-fixes-pr-901.patch
)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
Expand Down Expand Up @@ -48,6 +54,8 @@ vcpkg_cmake_configure(
-DENABLE_STATIC=${ENABLE_STATIC}
-DENABLE_SHARED=${ENABLE_SHARED}
-DWITH_CRT_DLL=${WITH_CRT_DLL}
-DWITH_SYSTEM_SPNG=ON
-DWITH_SYSTEM_ZLIB=ON
${FEATURE_OPTIONS}
${LIBJPEGTURBO_SIMD}
MAYBE_UNUSED_VARIABLES
Expand Down
59 changes: 59 additions & 0 deletions ports/libjpeg-turbo/system-dependency-fixes-pr-901.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1293dbb..92f981d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -735,10 +735,22 @@ if(WITH_TURBOJPEG OR WITH_TOOLS OR WITH_TESTS)
boolean_number(WITH_SYSTEM_SPNG)
report_option(WITH_SYSTEM_SPNG "System-supplied libspng")
if(WITH_SYSTEM_SPNG)
- include(FindPkgConfig)
- pkg_check_modules(spng REQUIRED spng IMPORTED_TARGET)
+ find_package(SPNG CONFIG QUIET)
+ if(SPNG_FOUND)
+ if(TARGET spng::spng)
+ set(SPNG_TARGET_DEFAULT spng::spng)
+ elseif(TARGET spng::spng_static)
+ set(SPNG_TARGET_DEFAULT spng::spng_static)
+ endif()
+ else()
+ include(FindPkgConfig)
+ pkg_check_modules(spng REQUIRED spng IMPORTED_TARGET)
+ set(SPNG_TARGET_DEFAULT PkgConfig::spng)
Comment on lines +19 to +21

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So this still goes against my "do not use imported targets from pkg-config" advise.
Again, the problem is that it works poorly for top-level projects in Windows because typically there is no pkg-config in the PATH. (It is resolved when building vcpkg ports, but not for top-level projects.)

+ endif()
+ set(SPNG_TARGET ${SPNG_TARGET_DEFAULT} CACHE STRING
+ "The imported target to use when linking libspng")
unset(SPNG_STATIC_SOURCES)
- set(SPNG_LIBRARY PkgConfig::spng)
+ set(SPNG_LIBRARY ${SPNG_TARGET})
else()
option(WITH_SYSTEM_ZLIB
"Build ${CMAKE_PROJECT_NAME} against the system-supplied zlib implementation rather than the implementation in the ${CMAKE_PROJECT_NAME} source tree"
diff --git a/release/Config.cmake.in b/release/Config.cmake.in
index 0c1ba8aa..dedc3617 100644
--- a/release/Config.cmake.in
+++ b/release/Config.cmake.in
@@ -1,4 +1,24 @@
@PACKAGE_INIT@

+set(WITH_SYSTEM_SPNG @WITH_SYSTEM_SPNG@)
+set(WITH_SYSTEM_ZLIB @WITH_SYSTEM_ZLIB@)
+
+if(WITH_SYSTEM_SPNG OR WITH_SYSTEM_ZLIB)
+ include(CMakeFindDependencyMacro)
+ if(WITH_SYSTEM_SPNG)
+ set(SPNG_LIBRARY @SPNG_LIBRARY@)
+ if(SPNG_LIBRARY MATCHES "PkgConfig::")
+ find_dependency(PkgConfig)
+ if(PkgConfig_FOUND)
+ pkg_check_modules(spng REQUIRED spng IMPORTED_TARGET)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

REQUIRED here breaks optional find_package. This another quirk with pkg-config for transitive dependencies for imported targets.

+ endif()
+ else()
+ find_dependency(SPNG)
+ endif()
+ else()
+ find_dependency(ZLIB)
+ endif()
+endif()
+
include("${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@Targets.cmake")
check_required_components("@CMAKE_PROJECT_NAME@")
18 changes: 9 additions & 9 deletions ports/libjpeg-turbo/usage
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
libjpeg-turbo is compatible with built-in implementation-agnostic CMake targets:
find_package(JPEG REQUIRED)
target_link_libraries(main PRIVATE JPEG::JPEG)
libjpeg-turbo provides CMake targets for the TurboJPEG C API:
find_package(libjpeg-turbo CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libjpeg-turbo::turbojpeg>,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>)
libjpeg-turbo is compatible with built-in implementation-agnostic CMake targets:

find_package(JPEG REQUIRED)
target_link_libraries(main PRIVATE JPEG::JPEG)

libjpeg-turbo provides CMake targets for the TurboJPEG C API:

find_package(libjpeg-turbo CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libjpeg-turbo::turbojpeg>,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>)
Comment on lines +1 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When this file is touched, it should re-formatted to align with heuristical output.

Suggested change
libjpeg-turbo is compatible with built-in implementation-agnostic CMake targets:
find_package(JPEG REQUIRED)
target_link_libraries(main PRIVATE JPEG::JPEG)
libjpeg-turbo provides CMake targets for the TurboJPEG C API:
find_package(libjpeg-turbo CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libjpeg-turbo::turbojpeg>,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>)
libjpeg-turbo is compatible with built-in implementation-agnostic CMake targets:
find_package(JPEG REQUIRED)
target_link_libraries(main PRIVATE JPEG::JPEG)
libjpeg-turbo provides CMake targets for the TurboJPEG C API:
find_package(libjpeg-turbo CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:libjpeg-turbo::turbojpeg>,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>)

76 changes: 38 additions & 38 deletions ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)
cmake_policy(SET CMP0054 NEW)
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(CMAKE_VERSION VERSION_LESS 3.12 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
set(JPEG_LIBRARY "${JPEG_LIBRARY_DEBUG}" CACHE FILEPATH "")
endif()
_find_package(${ARGS})
if(JPEG_FOUND AND NOT TARGET JPEG::JPEG)
# Backfill JPEG::JPEG to versions of cmake before 3.12
add_library(JPEG::JPEG UNKNOWN IMPORTED)
if(DEFINED JPEG_INCLUDE_DIRS)
set_target_properties(JPEG::JPEG PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${JPEG_INCLUDE_DIRS}")
endif()
if(EXISTS "${JPEG_LIBRARY}")
set_target_properties(JPEG::JPEG PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${JPEG_LIBRARY}")
endif()
if(EXISTS "${JPEG_LIBRARY_RELEASE}")
set_property(TARGET JPEG::JPEG APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(JPEG::JPEG PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
IMPORTED_LOCATION_RELEASE "${JPEG_LIBRARY_RELEASE}")
endif()
if(EXISTS "${JPEG_LIBRARY_DEBUG}")
set_property(TARGET JPEG::JPEG APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(JPEG::JPEG PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
IMPORTED_LOCATION_DEBUG "${JPEG_LIBRARY_DEBUG}")
endif()
endif()
cmake_policy(POP)
cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)
cmake_policy(SET CMP0054 NEW)
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(CMAKE_VERSION VERSION_LESS 3.12 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
set(JPEG_LIBRARY "${JPEG_LIBRARY_DEBUG}" CACHE FILEPATH "")
endif()
Comment on lines +7 to +9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since the wrapper is touched: CMake 3.12 is no longer supported when using vcpkg. This (and its usage further down) is obsolete.

_find_package(${ARGS})
if(JPEG_FOUND AND NOT TARGET JPEG::JPEG)
# Backfill JPEG::JPEG to versions of cmake before 3.12
add_library(JPEG::JPEG UNKNOWN IMPORTED)
if(DEFINED JPEG_INCLUDE_DIRS)
set_target_properties(JPEG::JPEG PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${JPEG_INCLUDE_DIRS}")
endif()
if(EXISTS "${JPEG_LIBRARY}")
set_target_properties(JPEG::JPEG PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${JPEG_LIBRARY}")
endif()
if(EXISTS "${JPEG_LIBRARY_RELEASE}")
set_property(TARGET JPEG::JPEG APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(JPEG::JPEG PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
IMPORTED_LOCATION_RELEASE "${JPEG_LIBRARY_RELEASE}")
endif()
if(EXISTS "${JPEG_LIBRARY_DEBUG}")
set_property(TARGET JPEG::JPEG APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(JPEG::JPEG PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
IMPORTED_LOCATION_DEBUG "${JPEG_LIBRARY_DEBUG}")
endif()
endif()
cmake_policy(POP)
7 changes: 5 additions & 2 deletions ports/libjpeg-turbo/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"name": "libjpeg-turbo",
"version": "3.2.0",
"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://libjpeg-turbo.org/",
"license": "BSD-3-Clause",
"license": "BSD-3-Clause AND IJG",
"dependencies": [
"libspng",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
},
"zlib"
],
"features": {
"jpeg7": {
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@ openmvg:arm64-windows=fail
openmvs:arm64-windows-static-md=fail # no _M_ARM64 detection
openmvs:arm64-windows=fail # no _M_ARM64 detection
openslide:x64-windows-release=fail # MSVC is not supported
openslide:x64-windows-static-md=fail
openslide:x64-windows-static=fail
openslide:x64-windows=fail
opensubdiv:x64-android=fail
openvino:arm64-android=skip # conflicts with kleidiai, also incorrect use of arm64 intrinsics in <wchar.h> in VS 2022 17.13 broke these with -Zc:arm64-aliased-neon-types-
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5234,7 +5234,7 @@
},
"libjpeg-turbo": {
"baseline": "3.2.0",
"port-version": 0
"port-version": 1
},
"libjuice": {
"baseline": "1.7.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libjpeg-turbo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "61a22603549b0f5c4ef1e5282f8d2c51ec40f952",
"version": "3.2.0",
"port-version": 1
},
{
"git-tree": "c7d2d8cbb868863a698862a0da02b4af225f3c72",
"version": "3.2.0",
Expand Down
Loading