2022-01-13 03:32:27 +08:00
|
|
|
diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake
|
2023-08-22 05:52:49 +08:00
|
|
|
index 5455a08..3b9530e 100644
|
2022-01-13 03:32:27 +08:00
|
|
|
--- a/share/cmake/modules/FindExtPackages.cmake
|
|
|
|
+++ b/share/cmake/modules/FindExtPackages.cmake
|
2023-08-22 05:52:49 +08:00
|
|
|
@@ -37,20 +37,20 @@ endif()
|
2022-01-13 03:32:27 +08:00
|
|
|
|
|
|
|
# expat
|
|
|
|
# https://github.com/libexpat/libexpat
|
2023-08-22 05:52:49 +08:00
|
|
|
-find_package(expat 2.4.1 REQUIRED)
|
2022-01-13 03:32:27 +08:00
|
|
|
+find_package(expat CONFIG REQUIRED)
|
|
|
|
|
|
|
|
# yaml-cpp
|
|
|
|
# https://github.com/jbeder/yaml-cpp
|
2023-08-22 05:52:49 +08:00
|
|
|
-find_package(yaml-cpp 0.7.0 REQUIRED)
|
2022-01-13 03:32:27 +08:00
|
|
|
+find_package(yaml-cpp CONFIG REQUIRED)
|
|
|
|
|
|
|
|
# pystring
|
|
|
|
# https://github.com/imageworks/pystring
|
|
|
|
-find_package(pystring 1.1.3 REQUIRED)
|
|
|
|
+find_package(pystring CONFIG REQUIRED)
|
|
|
|
|
2023-08-22 05:52:49 +08:00
|
|
|
# Imath (>=3.1)
|
|
|
|
# https://github.com/AcademySoftwareFoundation/Imath
|
|
|
|
set(_Imath_ExternalProject_VERSION "3.1.5")
|
|
|
|
-find_package(Imath 3.0 REQUIRED)
|
|
|
|
+find_package(Imath CONFIG REQUIRED)
|
2022-01-13 03:32:27 +08:00
|
|
|
|
2023-08-22 05:52:49 +08:00
|
|
|
###############################################################################
|
|
|
|
### ZLIB (https://github.com/madler/zlib)
|
|
|
|
@@ -138,7 +138,7 @@ endif()
|
2022-01-21 13:30:00 -08:00
|
|
|
|
2023-08-22 05:52:49 +08:00
|
|
|
# minizip-ng
|
|
|
|
# https://github.com/zlib-ng/minizip-ng
|
|
|
|
-find_package(minizip-ng 3.0.7 REQUIRED)
|
|
|
|
+find_package(minizip-ng CONFIG REQUIRED)
|
2022-01-21 13:30:00 -08:00
|
|
|
|
2023-08-22 05:52:49 +08:00
|
|
|
if(OCIO_BUILD_APPS)
|
|
|
|
|
|
|
|
@@ -149,7 +149,7 @@ if(OCIO_BUILD_APPS)
|
2022-01-13 03:32:27 +08:00
|
|
|
|
|
|
|
# lcms2
|
|
|
|
# https://github.com/mm2/Little-CMS
|
|
|
|
- find_package(lcms2 2.2 REQUIRED)
|
|
|
|
+ find_package(lcms2 CONFIG REQUIRED)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(OCIO_BUILD_OPENFX)
|
|
|
|
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
|
2024-07-05 19:36:32 +02:00
|
|
|
index 6a4932a..0fe7c89 100644
|
2022-01-13 03:32:27 +08:00
|
|
|
--- a/src/cmake/Config.cmake.in
|
|
|
|
+++ b/src/cmake/Config.cmake.in
|
2024-05-30 19:23:53 +02:00
|
|
|
@@ -1,6 +1,11 @@
|
2023-08-22 05:52:49 +08:00
|
|
|
@PACKAGE_INIT@
|
2024-07-05 19:36:32 +02:00
|
|
|
|
2022-01-13 03:32:27 +08:00
|
|
|
include(CMakeFindDependencyMacro)
|
2022-07-18 22:36:48 +02:00
|
|
|
+find_dependency(expat CONFIG)
|
|
|
|
+find_dependency(Imath CONFIG)
|
|
|
|
+find_dependency(pystring CONFIG)
|
|
|
|
+find_dependency(yaml-cpp CONFIG)
|
2023-08-26 03:40:43 +08:00
|
|
|
+find_dependency(minizip-ng CONFIG)
|
2024-07-05 19:36:32 +02:00
|
|
|
|
2023-08-22 05:52:49 +08:00
|
|
|
if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@
|
|
|
|
if (APPLE)
|
2024-07-05 19:36:32 +02:00
|
|
|
@@ -50,7 +55,8 @@ if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@
|
|
|
|
find_dependency(yaml-cpp @yaml-cpp_VERSION@)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
- if (NOT ZLIB::ZLIB)
|
|
|
|
+ find_dependency(ZLIB)
|
|
|
|
+ if (NOT TARGET ZLIB::ZLIB)
|
|
|
|
# ZLIB_VERSION is available starting CMake 3.26+.
|
|
|
|
# ZLIB_VERSION_STRING is still available for backward compatibility.
|
|
|
|
# See https://cmake.org/cmake/help/git-stage/module/FindZLIB.html
|