Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencolorio: add version 2.3.0, update dependencies #19549

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions recipes/opencolorio/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.3.0":
url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.3.0.tar.gz"
sha256: "32b7be676c110d849a77886d8a409159f0367309b2b2f5dae5aa0c38f42b445a"
"2.2.1":
url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.2.1.tar.gz"
sha256: "36f27c5887fc4e5c241805c29b8b8e68725aa05520bcaa7c7ec84c0422b8580e"
Expand All @@ -9,6 +12,16 @@ sources:
url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v1.1.1.tar.gz"
sha256: "c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8"
patches:
"2.3.0":
- patch_file: "patches/2.3.0-0001-fix-cmake-source-dir-and-targets.patch"
patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR"
patch_type: "conan"
- patch_file: "patches/2.3.0-0002-fix-pystring.patch"
patch_description: "fix include path for pystring"
patch_type: "conan"
- patch_file: "patches/2.2.1-0003-strlen.patch"
patch_description: "add std namespace for strlen"
patch_type: "portability"
"2.2.1":
- patch_file: "patches/2.2.1-0001-fix-cmake-source-dir-and-targets.patch"
patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR"
Expand Down
24 changes: 18 additions & 6 deletions recipes/opencolorio/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@ def requirements(self):
if Version(self.version) < "2.2.0":
self.requires("openexr/2.5.7")
else:
self.requires("openexr/3.1.7")
self.requires("imath/3.1.6")
self.requires("openexr/3.1.9")
self.requires("imath/3.1.9")

self.requires("yaml-cpp/0.7.0")
if Version(self.version) < "2.0.0":
self.requires("tinyxml/2.6.2")
self.requires("yaml-cpp/0.7.0")
else:
self.requires("pystring/1.1.4")
self.requires("yaml-cpp/0.8.0")

if Version(self.version) >= "2.2.0":
self.requires("minizip-ng/3.0.7")
if Version(self.version) >= "2.3.0":
self.requires("minizip-ng/4.0.1")
elif Version(self.version) >= "2.2.0":
self.requires("minizip-ng/3.0.9")

# for tools only
self.requires("lcms/2.14")
Expand All @@ -69,6 +72,15 @@ def requirements(self):
def validate(self):
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, 11)
if Version(self.version) >= "2.3.0" and \
self.settings.compiler == "gcc" and \
Version(self.settings.compiler.version) < "6.0":
raise ConanInvalidConfiguration(f"{self.ref} requires gcc >= 6.0")

if Version(self.version) >= "2.3.0" and \
self.settings.compiler == "clang" and \
self.settings.compiler.libcxx == "libc++":
raise ConanInvalidConfiguration(f"{self.ref} deosn't support clang with libc++")

# opencolorio>=2.2.0 requires minizip-ng with with_zlib
if Version(self.version) >= "2.2.0" and \
Expand All @@ -77,7 +89,7 @@ def validate(self):

if Version(self.version) == "1.1.1" and self.options.shared and self.dependencies["yaml-cpp"].options.shared:
raise ConanInvalidConfiguration(f"{self.ref} requires static build yaml-cpp")
if Version(self.version) == "2.2.1" and self.options.shared and self.dependencies["minizip-ng"].options.shared:
if Version(self.version) >= "2.2.1" and self.options.shared and self.dependencies["minizip-ng"].options.shared:
raise ConanInvalidConfiguration(f"{self.ref} requires static build minizip-ng")

def build_requirements(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,24 @@ index 17e188d..91af0ec 100755
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 5455a08..eb91a37 100644
index 5455a08..420fbd4 100644
--- a/share/cmake/modules/FindExtPackages.cmake
+++ b/share/cmake/modules/FindExtPackages.cmake
@@ -41,7 +41,7 @@ find_package(expat 2.4.1 REQUIRED)

# yaml-cpp
# https://github.com/jbeder/yaml-cpp
-find_package(yaml-cpp 0.7.0 REQUIRED)
+find_package(yaml-cpp 0.8.0 REQUIRED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+find_package(yaml-cpp 0.8.0 REQUIRED)
+find_package(yaml-cpp REQUIRED)

I have never used the version parameter in cmake myself, but does it make sense to fix the version here? Maybe someone has a reason to overwrite the version of yaml-cpp etc. and as long as there is no hard reason I'd personally not restrict it to a fixed version maybe.


# pystring
# https://github.com/imageworks/pystring
@@ -138,7 +138,7 @@ endif()

# minizip-ng
# https://github.com/zlib-ng/minizip-ng
-find_package(minizip-ng 3.0.7 REQUIRED)
+find_package(minizip 3.0.7 REQUIRED)
+find_package(minizip 3.0.9 REQUIRED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+find_package(minizip 3.0.9 REQUIRED)
+find_package(minizip REQUIRED)

As above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@irieger
I'm sorry for missing your comments.


if(OCIO_BUILD_APPS)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a36a0d8..650a3c5 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -508,7 +508,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 2625242..dcb41cf 100644
--- a/share/cmake/modules/FindExtPackages.cmake
+++ b/share/cmake/modules/FindExtPackages.cmake
@@ -63,7 +63,7 @@ ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL
# https://github.com/jbeder/yaml-cpp
ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL
MIN_VERSION 0.6.3
- RECOMMENDED_VERSION 0.7.0
+ RECOMMENDED_VERSION 0.8.0
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")

# pystring
@@ -110,9 +110,9 @@ ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL

# minizip-ng
# https://github.com/zlib-ng/minizip-ng
-ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL
+ocio_handle_dependency( minizip REQUIRED ALLOW_INSTALL
MIN_VERSION 3.0.6
- RECOMMENDED_VERSION 3.0.7
+ RECOMMENDED_VERSION 4.0.1
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")

###############################################################################
@@ -131,7 +131,7 @@ if(OCIO_BUILD_APPS)

# lcms2
# https://github.com/mm2/Little-CMS
- ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL
+ ocio_handle_dependency( lcms REQUIRED ALLOW_INSTALL
MIN_VERSION 2.2
RECOMMENDED_VERSION 2.2
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")
diff --git a/share/cmake/utils/CppVersion.cmake b/share/cmake/utils/CppVersion.cmake
index 175d89c..2d34a65 100644
--- a/share/cmake/utils/CppVersion.cmake
+++ b/share/cmake/utils/CppVersion.cmake
@@ -16,8 +16,6 @@ elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS)
"CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.")
endif()

-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}")
-
include(CheckCXXCompilerFlag)

# As CheckCXXCompilerFlag implicitly uses CMAKE_CXX_FLAGS some custom flags could trigger unrelated
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
index 7ff40bf..dec2bda 100755
--- a/src/OpenColorIO/CMakeLists.txt
+++ b/src/OpenColorIO/CMakeLists.txt
@@ -309,8 +309,8 @@ target_link_libraries(OpenColorIO
"$<BUILD_INTERFACE:utils::from_chars>"
"$<BUILD_INTERFACE:utils::strings>"
"$<BUILD_INTERFACE:xxHash>"
- ${YAML_CPP_LIBRARIES}
- MINIZIP::minizip-ng
+ yaml-cpp
+ MINIZIP::minizip
)

if(OCIO_USE_SIMD AND OCIO_USE_SSE2NEON AND COMPILER_SUPPORTS_SSE_WITH_SSE2NEON)
diff --git a/src/apps/ocioarchive/CMakeLists.txt b/src/apps/ocioarchive/CMakeLists.txt
index 599d706..efe6cd5 100644
--- a/src/apps/ocioarchive/CMakeLists.txt
+++ b/src/apps/ocioarchive/CMakeLists.txt
@@ -21,7 +21,7 @@ target_link_libraries(ocioarchive
PRIVATE
apputils
OpenColorIO
- MINIZIP::minizip-ng
+ MINIZIP::minizip
)

include(StripUtils)
diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt
index 3d6e586..f7069a1 100755
--- a/src/apps/ociobakelut/CMakeLists.txt
+++ b/src/apps/ociobakelut/CMakeLists.txt
@@ -29,7 +29,7 @@ set_target_properties(ociobakelut
target_link_libraries(ociobakelut
PRIVATE
apputils
- lcms2::lcms2
+ lcms::lcms
OpenColorIO
)

Loading