1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3feba7e..b4c2d47 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -518,7 +518,7 @@ install(
FILE ${OCIO_TARGETS_EXPORT_NAME}
)
-if (NOT BUILD_SHARED_LIBS)
+if (0)
# Install custom macros used in the find modules.
install(FILES
${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake
diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake
index aa2550a..3c968f7 100644
--- a/share/cmake/modules/FindExtPackages.cmake
+++ b/share/cmake/modules/FindExtPackages.cmake
@@ -55,6 +55,7 @@ message(STATUS "Checking for mandatory dependencies...")
# expat
# https://github.com/libexpat/libexpat
ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL
+ CONFIG
MIN_VERSION 2.4.1
RECOMMENDED_VERSION 2.5.0
RECOMMENDED_VERSION_REASON "CVE fixes and fix issue with symbol leakage when built as a static library")
@@ -62,6 +63,7 @@ ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL
# yaml-cpp
# https://github.com/jbeder/yaml-cpp
ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL
+ CONFIG
MIN_VERSION 0.6.3
RECOMMENDED_VERSION 0.7.0
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")
@@ -69,13 +71,13 @@ ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL
# pystring
# https://github.com/imageworks/pystring
ocio_handle_dependency( pystring REQUIRED ALLOW_INSTALL
- MIN_VERSION 1.1.3
- RECOMMENDED_VERSION 1.1.3
+ CONFIG
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")
# Imath (>=3.1)
# https://github.com/AcademySoftwareFoundation/Imath
ocio_handle_dependency( Imath REQUIRED ALLOW_INSTALL
+ CONFIG
MIN_VERSION 3.1.1
RECOMMENDED_VERSION 3.1.12
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")
@@ -111,7 +113,8 @@ ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL
# minizip-ng
# https://github.com/zlib-ng/minizip-ng
ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL
- MIN_VERSION 3.0.6
+ CONFIG
+ MIN_VERSION 4
RECOMMENDED_VERSION 3.0.7
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")
@@ -132,8 +135,7 @@ if(OCIO_BUILD_APPS)
# lcms2
# https://github.com/mm2/Little-CMS
ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL
- MIN_VERSION 2.2
- RECOMMENDED_VERSION 2.2
+ CONFIG
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")
endif()
@@ -259,6 +261,7 @@ if(OCIO_BUILD_APPS)
###############################################################################
# Calling find_package in CONFIG mode using PREFER_CONFIG option.
ocio_handle_dependency( OpenEXR PREFER_CONFIG ALLOW_INSTALL
+ CONFIG
MIN_VERSION ${OpenEXR_MININUM_VERSION}
RECOMMENDED_VERSION 3.1.5
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO"
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
index 4e2367b..fc0e483 100644
--- a/src/cmake/Config.cmake.in
+++ b/src/cmake/Config.cmake.in
@@ -23,19 +23,19 @@ if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@
########################
if (NOT TARGET expat::expat)
- find_dependency(expat @expat_VERSION@)
+ find_dependency(expat @expat_VERSION@ CONFIG)
endif()
if (NOT TARGET Imath::Imath)
- find_dependency(Imath @Imath_VERSION@)
+ find_dependency(Imath @Imath_VERSION@ CONFIG)
endif()
if (NOT TARGET pystring::pystring)
- find_dependency(pystring @pystring_VERSION@)
+ find_dependency(pystring @pystring_VERSION@ CONFIG)
endif()
if (NOT TARGET yaml-cpp::yaml-cpp)
- find_dependency(yaml-cpp @yaml-cpp_VERSION@)
+ find_dependency(yaml-cpp @yaml-cpp_VERSION@ CONFIG)
if (TARGET yaml-cpp AND NOT TARGET yaml-cpp::yaml-cpp)
add_library(yaml-cpp::yaml-cpp ALIAS yaml-cpp)
endif()
@@ -54,7 +54,7 @@ if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@
endif()
if (NOT TARGET MINIZIP::minizip-ng)
- find_dependency(minizip-ng @minizip-ng_VERSION@)
+ find_dependency(minizip-ng @minizip-ng_VERSION@ CONFIG)
endif()
# Remove OCIO custom find module path.
|