mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 07:59:01 +08:00
40ec948687
* Fix exported Imath dependency * Drop unused deps from patches and config * Handle DLL import in installed header * Fix non-required find_package(OpenColorIO) * Omit unrelocatable script * Installation cleanup * Update to 2.1.2 * Fix exported pc file * Update versions * Silence warning * Update versions * OpenImageIO features CI test * Consolidate patches * Revise OpenJPEG patching * Revise PNG patching * Revise libheif patching * Revise libsquish patching * Revise ffmpeg patching * Fix static ffmpeg linking * Fix webp usage * More dependency control * Misc cleanup * Update copyright, add usage * Move config to share/openimageio * Trim dependencies * Revise opencv dependency * Remove find modules which might clash with opencv * Use opencolorio config and target * Update openimageio to 2.3.17.0 * LINKSTATIC breaks CRT lib linkage * Catch Imath version conflicts. This is not a regression but the result of previous opencolorio changes. It will eventually be resolved by upgrading openexr. * Remove llvm from opencv CI test port [skip actions] * [libheif] Fix symbol export * [skip actions] * Update versions * Add baseline =pass entries. Co-authored-by: Billy O'Neal <bion@microsoft.com>
107 lines
3.6 KiB
Diff
107 lines
3.6 KiB
Diff
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
|
|
index b690864..fb45388 100644
|
|
--- a/src/cmake/Config.cmake.in
|
|
+++ b/src/cmake/Config.cmake.in
|
|
@@ -1,6 +1,21 @@
|
|
@PACKAGE_INIT@
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
+find_dependency(libheif CONFIG)
|
|
+find_dependency(PNG)
|
|
+find_dependency(unofficial-libsquish CONFIG)
|
|
+if(@USE_OPENCV@)
|
|
+ find_dependency(OpenCV CONFIG)
|
|
+endif()
|
|
+if(@USE_OPENCOLORIO@)
|
|
+ find_dependency(OpenColorIO CONFIG)
|
|
+endif()
|
|
+if(@USE_OPENJPEG@)
|
|
+ find_dependency(OpenJPEG CONFIG)
|
|
+endif()
|
|
+if(@USE_WEBP@)
|
|
+ find_dependency(WebP CONFIG)
|
|
+endif()
|
|
|
|
# add here all the find_dependency() whenever switching to config based dependencies
|
|
if (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 3.0)
|
|
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
|
|
index 631035a..d416d78 100644
|
|
--- a/src/cmake/externalpackages.cmake
|
|
+++ b/src/cmake/externalpackages.cmake
|
|
@@ -158,14 +158,19 @@ endif ()
|
|
checked_find_package (Freetype
|
|
DEFINITIONS -DUSE_FREETYPE=1 )
|
|
|
|
-checked_find_package (OpenColorIO
|
|
+set(OPENCOLORIO_INCLUDES "")
|
|
+set(OPENCOLORIO_LIBRARIES OpenColorIO::OpenColorIO)
|
|
+checked_find_package (OpenColorIO CONFIG
|
|
DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1
|
|
# PREFER_CONFIG
|
|
)
|
|
+set(OPENCOLORIO_FOUND "${OpenColorIO_FOUND}")
|
|
if (NOT OPENCOLORIO_FOUND)
|
|
set (OPENCOLORIO_FOUND 0)
|
|
endif ()
|
|
-checked_find_package (OpenCV 3.0
|
|
+set(OPENCV_INCLUDES "")
|
|
+set(OPENCV_LIBRARIES opencv_core)
|
|
+checked_find_package (OpenCV CONFIG
|
|
DEFINITIONS -DUSE_OPENCV=1)
|
|
|
|
# Intel TBB
|
|
@@ -175,7 +177,9 @@ checked_find_package (TBB 2017
|
|
PREFER_CONFIG)
|
|
|
|
checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images
|
|
-checked_find_package (FFmpeg VERSION_MIN 3.0)
|
|
+checked_find_package (FFMPEG)
|
|
+set(FFmpeg_FOUND "${FFMPEG_FOUND}")
|
|
+set(FFMPEG_INCLUDES "${FFMPEG_INCLUDE_DIRS}")
|
|
checked_find_package (GIF
|
|
VERSION_MIN 4
|
|
RECOMMEND_MIN 5.0
|
|
@@ -200,7 +200,9 @@ if (ENABLE_FIELD3D)
|
|
endif ()
|
|
|
|
# For HEIF/HEIC/AVIF formats
|
|
-checked_find_package (Libheif VERSION_MIN 1.3
|
|
+set(LIBHEIF_INCLUDES "")
|
|
+set(LIBHEIF_LIBRARIES heif)
|
|
+checked_find_package (Libheif CONFIG
|
|
RECOMMEND_MIN 1.7
|
|
RECOMMEND_MIN_REASON "for AVIF support")
|
|
if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11)
|
|
@@ -221,9 +222,8 @@ if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VER
|
|
# set (LIBRAW_FOUND 0)
|
|
endif ()
|
|
|
|
-checked_find_package (OpenJPEG VERSION_MIN 2.0
|
|
- RECOMMEND_MIN 2.2
|
|
- RECOMMEND_MIN_REASON "for multithreading support")
|
|
+set(CMAKE_REQUIRE_FIND_PACKAGE_OpenJPEG ${USE_OPENJPEG})
|
|
+checked_find_package (OpenJPEG CONFIG)
|
|
# Note: Recent OpenJPEG versions have exported cmake configs, but we don't
|
|
# find them reliable at all, so we stick to our FindOpenJPEG.cmake module.
|
|
|
|
@@ -240,6 +243,8 @@ if (NOT Ptex_FOUND OR NOT Ptex_VERSION)
|
|
checked_find_package (Ptex)
|
|
endif ()
|
|
|
|
+set(WEBP_INCLUDES "")
|
|
+set(WEBP_LIBRARIES WebP::webp WebP::webpdemux)
|
|
checked_find_package (WebP)
|
|
|
|
option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF)
|
|
@@ -307,7 +309,9 @@ endmacro()
|
|
option (USE_EMBEDDED_LIBSQUISH
|
|
"Force use of embedded Libsquish, even if external is found" OFF)
|
|
if (NOT USE_EMBEDDED_LIBSQUISH)
|
|
- checked_find_package (Libsquish)
|
|
+ set(LIBSQUISH_INCLUDES "")
|
|
+ set(LIBSQUISH_LIBRARIES unofficial::libsquish::squish)
|
|
+ checked_find_package (Libsquish NAMES unofficial-libsquish)
|
|
endif ()
|
|
|
|
|