vcpkg/ports/osg/use-openexr-config.patch
Kai Pastor 62850c28d0
[vcpkg baseline][osg] Fix port dependencies and build errors (#26698)
* Don't depend on default features

* Use OpenEXR config

* Try to skip non-portable check_cxx_source_runs

* Ensure PKG_CONFIG_USE_CMAKE_PREFIX_PATH

* Use link libraries from pkg-config

* Revise feature-to-CMake mapping

* Update versions
2022-09-14 11:24:49 -07:00

21 lines
666 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3363305..8516539 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -739,10 +739,13 @@ IF(ANDROID)
ELSE()
# Common to all platforms except android:
FIND_PACKAGE(Freetype)
- FIND_PACKAGE(ilmbase)
FIND_PACKAGE(Inventor)
FIND_PACKAGE(Jasper)
- FIND_PACKAGE(OpenEXR)
+ FIND_PACKAGE(OpenEXR CONFIG)
+ set(OPENEXR_LIBRARY OpenEXR::IlmImf)
+ set(OPENEXR_LIBRARIES_VARS OPENEXR_LIBRARY)
+ set(OPENEXR_INCLUDE_DIR "${OpenEXR_DIR}/../../include")
+ set(ILMBASE_INCLUDE_DIR "${OpenEXR_DIR}/../../include")
FIND_PACKAGE(OpenCascade)
FIND_PACKAGE(COLLADA)
FIND_PACKAGE(FBX)