vcpkg/ports/openimageio/fix-openexr-dll.patch
Kai Pastor 40ec948687
[openimageio] Update to v2.3.17.0, revise dependencies and export ()
* 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>
2022-07-28 22:19:42 -07:00

14 lines
559 B
Diff

diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
index b50a923..c3250b9 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
@@ -108,7 +108,7 @@ if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3)
# clang C++ >= 11 doesn't like 'register' keyword in old exr headers
add_compile_options (-Wno-deprecated-register)
endif ()
-if (MSVC AND NOT LINKSTATIC)
+if (WIN32 AND BUILD_SHARED_LIBS)
add_definitions (-DOPENEXR_DLL) # Is this needed for new versions?
endif ()