forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openimageio] Updated version fixes oiiotool.exe functionality (micro…
…soft#33210) * fix oiiotool.exe * update version * update version * fix iconv * update version * fix build erro on osx * update version * Generate Imath.pc * update version * add dependency imath minizip-ng * updata version * update version * version
- Loading branch information
1 parent
548302b
commit d5b03c1
Showing
18 changed files
with
149 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 17e188d..c6c5ff5 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -341,11 +341,7 @@ if (NOT BUILD_SHARED_LIBS) | ||
|
||
# Install custom Find modules. | ||
install(FILES | ||
- ${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/Findexpat.cmake | ||
- ${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/FindImath.cmake | ||
- ${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/Findpystring.cmake | ||
${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/Findminizip-ng.cmake | ||
- ${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/Findyaml-cpp.cmake | ||
DESTINATION ${OCIO_CUSTOM_FIND_MODULE_DIR} | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,42 @@ | ||
diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake | ||
index 8787b87..f953ceb 100644 | ||
index 5455a08..3b9530e 100644 | ||
--- a/share/cmake/modules/FindExtPackages.cmake | ||
+++ b/share/cmake/modules/FindExtPackages.cmake | ||
@@ -26,15 +26,15 @@ set(CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY ON CACHE BOOL | ||
@@ -37,20 +37,20 @@ endif() | ||
|
||
# expat | ||
# https://github.com/libexpat/libexpat | ||
-find_package(expat 2.2.8 REQUIRED) | ||
-find_package(expat 2.4.1 REQUIRED) | ||
+find_package(expat CONFIG REQUIRED) | ||
|
||
# yaml-cpp | ||
# https://github.com/jbeder/yaml-cpp | ||
-find_package(yaml-cpp 0.6.3 REQUIRED) | ||
-find_package(yaml-cpp 0.7.0 REQUIRED) | ||
+find_package(yaml-cpp CONFIG REQUIRED) | ||
|
||
# pystring | ||
# https://github.com/imageworks/pystring | ||
-find_package(pystring 1.1.3 REQUIRED) | ||
+find_package(pystring CONFIG REQUIRED) | ||
|
||
# Half | ||
# NOTE: OCIO_USE_IMATH_HALF needs to be an integer for use in utils/Half.h.in | ||
@@ -42,7 +42,7 @@ if(NOT OCIO_USE_OPENEXR_HALF) | ||
# 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) | ||
|
||
# Imath (>=3.0) | ||
# https://github.com/AcademySoftwareFoundation/Imath | ||
- find_package(Imath 3.1.2 REQUIRED) | ||
+ find_package(Imath CONFIG REQUIRED) | ||
|
||
set(OCIO_HALF_LIB Imath::Imath CACHE STRING "Half library target" FORCE) | ||
set(OCIO_USE_IMATH_HALF "1" CACHE STRING "Whether 'half' type will be sourced from the Imath library (>=v3.0)" FORCE) | ||
@@ -50,7 +50,7 @@ else() | ||
############################################################################### | ||
### ZLIB (https://github.com/madler/zlib) | ||
@@ -138,7 +138,7 @@ endif() | ||
|
||
# OpenEXR/IlmBase (<=2.5) | ||
# https://github.com/AcademySoftwareFoundation/openexr | ||
- find_package(Half 2.4.0 REQUIRED) | ||
+ find_package(Half CONFIG REQUIRED) | ||
# minizip-ng | ||
# https://github.com/zlib-ng/minizip-ng | ||
-find_package(minizip-ng 3.0.7 REQUIRED) | ||
+find_package(minizip-ng CONFIG REQUIRED) | ||
|
||
set(OCIO_HALF_LIB IlmBase::Half CACHE STRING "Half library target" FORCE) | ||
set(OCIO_USE_IMATH_HALF "0" CACHE STRING "Whether 'half' type will be sourced from the Imath library (>=v3.0)" FORCE) | ||
@@ -65,7 +65,7 @@ if(OCIO_BUILD_APPS) | ||
if(OCIO_BUILD_APPS) | ||
|
||
@@ -149,7 +149,7 @@ if(OCIO_BUILD_APPS) | ||
|
||
# lcms2 | ||
# https://github.com/mm2/Little-CMS | ||
|
@@ -48,34 +45,18 @@ index 8787b87..f953ceb 100644 | |
endif() | ||
|
||
if(OCIO_BUILD_OPENFX) | ||
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt | ||
index 034185d..b992bbc 100755 | ||
--- a/src/OpenColorIO/CMakeLists.txt | ||
+++ b/src/OpenColorIO/CMakeLists.txt | ||
@@ -226,9 +226,9 @@ target_link_libraries(OpenColorIO | ||
expat::expat | ||
${OCIO_HALF_LIB} | ||
pystring::pystring | ||
- sampleicc::sampleicc | ||
- utils::from_chars | ||
- utils::strings | ||
+ "$<BUILD_INTERFACE:sampleicc::sampleicc>" | ||
+ "$<BUILD_INTERFACE:utils::from_chars>" | ||
+ "$<BUILD_INTERFACE:utils::strings>" | ||
yaml-cpp | ||
) | ||
|
||
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in | ||
index eebb2c1..7147dc3 100644 | ||
index 6a4932a..b8298f0 100644 | ||
--- a/src/cmake/Config.cmake.in | ||
+++ b/src/cmake/Config.cmake.in | ||
@@ -2,4 +2,9 @@ | ||
@@ -1,6 +1,10 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
+find_dependency(expat CONFIG) | ||
+find_dependency(Imath CONFIG) | ||
+find_dependency(pystring CONFIG) | ||
+find_dependency(yaml-cpp CONFIG) | ||
+ | ||
include(${CMAKE_CURRENT_LIST_DIR}/@[email protected]) | ||
|
||
if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@ | ||
if (APPLE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
diff --git a/src/OpenColorIO/OCIOZArchive.cpp b/src/OpenColorIO/OCIOZArchive.cpp | ||
index 85fc7bb..e07ed23 100644 | ||
--- a/src/OpenColorIO/OCIOZArchive.cpp | ||
+++ b/src/OpenColorIO/OCIOZArchive.cpp | ||
@@ -225,7 +225,7 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c | ||
std::string configStr = ss.str(); | ||
|
||
// Write zip to memory stream. | ||
- mz_stream_mem_create(&write_mem_stream); | ||
+ mz_stream_mem_create(); | ||
mz_stream_mem_set_grow_size(write_mem_stream, 128 * 1024); | ||
mz_stream_open(write_mem_stream, NULL, MZ_OPEN_MODE_CREATE); | ||
|
||
@@ -237,7 +237,7 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c | ||
options.compress_level = ArchiveCompressionLevels::BEST; | ||
|
||
// Create the writer handle. | ||
- mz_zip_writer_create(&archiver); | ||
+ mz_zip_writer_create(); | ||
|
||
// Archive options. | ||
// Compression method | ||
@@ -332,7 +332,7 @@ void ExtractOCIOZArchive(const char * archivePath, const char * destination) | ||
std::string outputDestination = pystring::os::path::normpath(destination); | ||
|
||
// Create zip reader. | ||
- mz_zip_reader_create(&extracter); | ||
+ mz_zip_reader_create(); | ||
|
||
MinizipNgHandlerGuard extracterGuard(extracter, false, false); | ||
|
||
@@ -450,7 +450,7 @@ std::vector<uint8_t> getFileStringFromArchiveFile(const std::string & filepath, | ||
std::vector<uint8_t> buffer; | ||
|
||
// Create the reader object. | ||
- mz_zip_reader_create(&reader); | ||
+ mz_zip_reader_create(); | ||
|
||
MinizipNgHandlerGuard extracterGuard(reader, false, true); | ||
|
||
@@ -510,7 +510,7 @@ void getEntriesMappingFromArchiveFile(const std::string & archivePath, | ||
void *reader = NULL; | ||
|
||
// Create the reader object. | ||
- mz_zip_reader_create(&reader); | ||
+ mz_zip_reader_create(); | ||
|
||
MinizipNgHandlerGuard extracterGuard(reader, false, false); | ||
|
||
diff --git a/src/OpenColorIO/OCIOZArchive.cpp b/src/OpenColorIO/OCIOZArchive.cpp | ||
index 85fc7bb..45416cd 100644 | ||
--- a/src/OpenColorIO/OCIOZArchive.cpp | ||
+++ b/src/OpenColorIO/OCIOZArchive.cpp | ||
@@ -24,9 +24,11 @@ | ||
#include "mz_strm_mem.h" | ||
#include "mz_strm_os.h" | ||
#include "mz_strm_split.h" | ||
-#include "mz_strm_zlib.h" | ||
#include "mz_zip.h" | ||
#include "mz_zip_rw.h" | ||
+#ifndef __APPLE__ | ||
+#include "mz_strm_zlib.h" | ||
+#endif | ||
|
||
namespace OCIO_NAMESPACE | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake | ||
index dad053c..4d7e11c 100644 | ||
index 0ca1fe6..1eeb5ab 100644 | ||
--- a/src/cmake/externalpackages.cmake | ||
+++ b/src/cmake/externalpackages.cmake | ||
@@ -103,7 +103,7 @@ checked_find_package (OpenEXR REQUIRED | ||
@@ -105,7 +105,7 @@ checked_find_package (OpenEXR REQUIRED | ||
# building against Imath/OpenEXR 3.x when there is still a system-level | ||
# install version of 2.x. | ||
include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) | ||
-if (MSVC AND NOT LINKSTATIC) | ||
+if (WIN32 AND BUILD_SHARED_LIBS) | ||
add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? | ||
endif () | ||
if (OPENEXR_VERSION VERSION_GREATER_EQUAL 3.0) | ||
if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters