aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-08-21 05:56:32 +0800
committerCurtis J Bezault <curtbezault@gmail.com>2019-08-20 14:56:32 -0700
commite5bf7eae99f3be342bfdd7a3c999daba62d4436a (patch)
tree2b9d2ad1d0e7b5a4382f81494f2af262f7511680
parentd941bb553a6d1a63569b4bb7681ab57f869f64e2 (diff)
downloadvcpkg-e5bf7eae99f3be342bfdd7a3c999daba62d4436a.tar.gz
vcpkg-e5bf7eae99f3be342bfdd7a3c999daba62d4436a.zip
[openimageio]Fix find correct debug/release openexr libraries. (#7747)
-rw-r--r--ports/openimageio/CONTROL2
-rw-r--r--ports/openimageio/fix_find_openexr.patch48
-rw-r--r--ports/openimageio/portfile.cmake1
3 files changed, 50 insertions, 1 deletions
diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL
index 94ae8654e..30d1fae48 100644
--- a/ports/openimageio/CONTROL
+++ b/ports/openimageio/CONTROL
@@ -1,5 +1,5 @@
Source: openimageio
-Version: 2019-08-08-1
+Version: 2019-08-08-2
Homepage: https://github.com/OpenImageIO/oiio
Description: A library for reading and writing images, and a bunch of related classes, utilities, and application
Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace
diff --git a/ports/openimageio/fix_find_openexr.patch b/ports/openimageio/fix_find_openexr.patch
new file mode 100644
index 000000000..a2014f3d8
--- /dev/null
+++ b/ports/openimageio/fix_find_openexr.patch
@@ -0,0 +1,48 @@
+diff --git a/src/cmake/modules/FindOpenEXR.cmake b/src/cmake/modules/FindOpenEXR.cmake
+index babfffd..8e79925 100644
+--- a/src/cmake/modules/FindOpenEXR.cmake
++++ b/src/cmake/modules/FindOpenEXR.cmake
+@@ -118,24 +118,25 @@ endif ()
+ # headers, we do two finds -- first for custom locations, then for default.
+ # This is complicated because the OpenEXR libraries may or may not be
+ # built with version numbers embedded.
+-set (_openexr_components IlmThread IlmImf Imath Iex Half)
+-foreach (COMPONENT ${_openexr_components})
+- string (TOUPPER ${COMPONENT} UPPERCOMPONENT)
+- # First try with the version embedded
+- set (FULL_COMPONENT_NAME ${COMPONENT}-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
+- find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME}
+- PATHS ${OPENEXR_LIBRARY_DIR} $ENV{OPENEXR_LIBRARY_DIR}
+- ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH)
+- # Again, with no directory restrictions
+- find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME})
+- # Try again without the version
+- set (FULL_COMPONENT_NAME ${COMPONENT})
+- find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME}
+- PATHS ${OPENEXR_LIBRARY_DIR} $ENV{OPENEXR_LIBRARY_DIR}
+- ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH)
+- # One more time, with no restrictions
+- find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME})
+-endforeach ()
++find_library(ILMTHREAD_LIBRARY_RELEASE NAMES IlmThread-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
++find_library(ILMTHREAD_LIBRARY_DEBUG NAMES IlmThread-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d)
++select_library_configurations(ILMTHREAD)
++
++find_library(OPENEXR_ILMIMF_LIBRARY_RELEASE NAMES IlmImf-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
++find_library(OPENEXR_ILMIMF_LIBRARY_DEBUG NAMES IlmImf-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d)
++select_library_configurations(OPENEXR_ILMIMF)
++
++find_library(OPENEXR_IMATH_LIBRARY_RELEASE NAMES Imath-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
++find_library(OPENEXR_IMATH_LIBRARY_DEBUG NAMES Imath-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d)
++select_library_configurations(OPENEXR_IMATH)
++
++find_library(OPENEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
++find_library(OPENEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d)
++select_library_configurations(OPENEXR_IEX)
++
++find_library(OPENEXR_HALF_LIBRARY_RELEASE NAMES Half-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
++find_library(OPENEXR_HALF_LIBRARY_DEBUG NAMES Half-${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR}_d)
++select_library_configurations(OPENEXR_HALF)
+
+ # Set the FOUND, INCLUDE_DIR, and LIBRARIES variables.
+ if (ILMBASE_INCLUDE_PATH AND OPENEXR_INCLUDE_PATH AND
diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake
index 7284d58b8..09ac52960 100644
--- a/ports/openimageio/portfile.cmake
+++ b/ports/openimageio/portfile.cmake
@@ -10,6 +10,7 @@ vcpkg_from_github(
fix_libraw.patch
use-webp.patch
remove_wrong_dependency.patch
+ fix_find_openexr.patch
)
file(REMOVE_RECURSE "${SOURCE_PATH}/ext")