diff --git a/3rdparty/ext_ocio/CMakeLists.txt b/3rdparty/ext_ocio/CMakeLists.txt index edb402849d..3805b69b03 100644 --- a/3rdparty/ext_ocio/CMakeLists.txt +++ b/3rdparty/ext_ocio/CMakeLists.txt @@ -1,35 +1,35 @@ # # The latest opencolorio doesn't build on Windows without using boost::ptr, but if you build # it with boost::ptr, you cannot link to it because of missing dll exports, so build an older # ocio on Windows. # SET(EXTPREFIX_ocio "${EXTPREFIX}" ) if (MINGW) ExternalProject_Add( ext_ocio DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL http://files.kde.org/krita/build/dependencies/OpenColorIO-master.zip - URL_MD5 7065faa41103ed27f5ea9b01b9e14c91 + URL https://github.com/imageworks/OpenColorIO/archive/v1.1.0.zip + URL_MD5 aa52d77b6a4e03017beefaefa613b49f INSTALL_DIR ${EXTPREFIX_ocio} - PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch.diff + PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/ocio-mingw.patch - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_ocio} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_TRUELIGHT=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF -DOCIO_BUILD_STATIC_JNIGLUE=OFF + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_ocio} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_TRUELIGHT=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF -DOCIO_BUILD_STATIC=OFF -DOCIO_BUILD_JNIGLUE=OFF UPDATE_COMMAND "" DEPENDS ext_boost ) else() ExternalProject_Add( ext_ocio DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL http://files.kde.org/krita/build/dependencies/OpenColorIO-master.zip - URL_MD5 7065faa41103ed27f5ea9b01b9e14c91 + URL https://github.com/imageworks/OpenColorIO/archive/v1.1.0.zip + URL_MD5 aa52d77b6a4e03017beefaefa613b49f INSTALL_DIR ${EXTPREFIX_ocio} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_ocio} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_TRUELIGHT=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_DOCS=OFF -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF -DOCIO_BUILD_STATIC_JNIGLUE=OFF UPDATE_COMMAND "" DEPENDS ext_boost ) endif() diff --git a/3rdparty/ext_ocio/ocio-mingw.patch b/3rdparty/ext_ocio/ocio-mingw.patch new file mode 100644 index 0000000000..a4280c3f7c --- /dev/null +++ b/3rdparty/ext_ocio/ocio-mingw.patch @@ -0,0 +1,219 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b05c7e4..c4f60f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,12 @@ if(NOT DEFINED CMAKE_FIRST_RUN) + SET(CMAKE_FIRST_RUN 1 CACHE INTERNAL "") + endif() + ++if (WIN32) ++ set(PATCH myptch) ++else() ++ set(PATCH patch) ++endif () ++ + ############################################################################### + ### GLOBAL ### + +@@ -29,7 +35,7 @@ option(OCIO_INLINES_HIDDEN "Specify whether to build with -fvisibility-inlines-h + + # Use boost's shared_ptr by default on Windows (as + +-#ifndef WIN32 ++#ifndef _MSC_VER + + // fwd declare yaml-cpp visibility + #pragma GCC visibility push(hidden) +@@ -67,14 +67,14 @@ namespace YAML { + + #endif + +-#ifdef WIN32 ++#ifdef _MSC_VER + #pragma warning( push ) + #pragma warning( disable: 4146 ) + #endif + + #include + +-#ifdef WIN32 ++#ifdef _MSC_VER + #pragma warning( pop ) + #endif + +diff --git a/src/core/Platform.cpp b/src/core/Platform.cpp +index 40db06b..b54091f 100644 +--- a/src/core/Platform.cpp ++++ b/src/core/Platform.cpp +@@ -18,7 +18,7 @@ OCIO_NAMESPACE_ENTER + // + void getenv (const char* name, std::string& value) + { +-#ifdef WINDOWS ++#ifdef _MSC_VER + // To remove the security compilation warning, the _dupenv_s method + // must be used (instead of the getenv). The improvement is that + // the buffer length is now under control to mitigate buffer overflow attacks. +diff --git a/src/core/UnitTest.cpp b/src/core/UnitTest.cpp +index 5a60923..d887a3f 100644 +--- a/src/core/UnitTest.cpp ++++ b/src/core/UnitTest.cpp +@@ -31,14 +31,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #ifdef OCIO_UNIT_TEST + +-#ifndef WIN32 ++#ifndef _MSC_VER + #pragma GCC visibility push(default) + #endif + + #include // OIIO unit tests header + OIIO_TEST_APP(OpenColorIO_Core_Unit_Tests) + +-#ifndef WIN32 ++#ifndef _MSC_VER + #pragma GCC visibility pop + #endif + +diff --git a/src/core/UnitTest.h b/src/core/UnitTest.h +index fd86a9e..82fd4e3 100644 +--- a/src/core/UnitTest.h ++++ b/src/core/UnitTest.h +@@ -31,13 +31,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #ifdef OCIO_UNIT_TEST + +-#ifndef WIN32 ++#ifndef _MSC_VER + #pragma GCC visibility push(default) + #endif + + #include // OIIO unit tests header + +-#ifndef WIN32 ++#ifndef _MSC_VER + #pragma GCC visibility pop + #endif + +diff --git a/src/core_tests/CMakeLists.txt b/src/core_tests/CMakeLists.txt +index a5c563d..78cb78b 100644 +--- a/src/core_tests/CMakeLists.txt ++++ b/src/core_tests/CMakeLists.txt +@@ -11,7 +11,7 @@ include_directories( + ${EXTERNAL_INCLUDE_DIRS} + ) + +-if(WIN32) ++if(MSVC) + # Hack to get around the "Debug" and "Release" sub directories + # cmake tries to add with Windows VC+++ IDE + +diff --git a/src/pyglue/CMakeLists.txt b/src/pyglue/CMakeLists.txt +index a90ca1c..eda8ead 100644 +--- a/src/pyglue/CMakeLists.txt ++++ b/src/pyglue/CMakeLists.txt +@@ -13,7 +13,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing -Wno-missing-field-initializers") + endif() + +-if(WIN32) ++if(MSVC) + # Mute a design issue where the Exception public class inherits + # from a STL Exception. STL classes are never supposed to + # be exported among different dynamic libraries. diff --git a/3rdparty/ext_ocio/patch.diff b/3rdparty/ext_ocio/patch.diff deleted file mode 100644 index 62ad94dc9c..0000000000 --- a/3rdparty/ext_ocio/patch.diff +++ /dev/null @@ -1,83 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b539ea1..2fc1034 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -9,6 +9,12 @@ if(NOT DEFINED CMAKE_FIRST_RUN) - SET(CMAKE_FIRST_RUN 1 CACHE INTERNAL "") - endif() - -+if (WIN32) -+ set(PATCH myptch) -+else() -+ set(PATCH patch) -+endif () -+ - ############################################################################### - ### GLOBAL ### - -@@ -183,12 +189,12 @@ else(USE_EXTERNAL_TINYXML) - endif() - ExternalProject_Add(tinyxml - URL ${CMAKE_SOURCE_DIR}/ext/tinyxml_${TINYXML_VERSION}.tar.gz -- PATCH_COMMAND patch -f -p1 < ${CMAKE_SOURCE_DIR}/ext/tinyxml_${TINYXML_VERSION}.patch -+ PATCH_COMMAND ${PATCH} --binary -f -p1 < ${CMAKE_SOURCE_DIR}/ext/tinyxml_${TINYXML_VERSION}.patch - BINARY_DIR ext/build/tinyxml - INSTALL_DIR ext/dist - CMAKE_ARGS ${TINYXML_CMAKE_ARGS} - ) -- if(WIN32) -+ if(MSVC) - set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib) - else() - set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libtinyxml.a) -@@ -252,13 +258,13 @@ else(USE_EXTERNAL_YAML) - ExternalProject_Add(YAML_CPP_LOCAL - URL ${CMAKE_SOURCE_DIR}/ext/yaml-cpp-${YAML_CPP_VERSION}.tar.gz - BINARY_DIR ext/build/yaml-cpp -- PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/yaml-cpp-${YAML_CPP_VERSION}.patch -+ PATCH_COMMAND ${PATCH} --binary -p1 < ${CMAKE_SOURCE_DIR}/ext/yaml-cpp-${YAML_CPP_VERSION}.patch - INSTALL_DIR ext/dist - CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS} - ) - set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include) - set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib) -- if(WIN32) -+ if(MSVC) - set(YAML_CPP_STATIC_DEBUG_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cppmdd.lib) - set(YAML_CPP_STATIC_OPTIMIZED_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cppmd.lib) - else() -@@ -304,7 +310,7 @@ endif() - messageonce("SSE Optimizations: ${OCIO_USE_SSE}") - - if(OCIO_USE_SSE) -- if(WIN32) -+ if(MSVC) - # SSE instructions are automatically compiled into 64-bit applications so enabling the option is redundant and - # actually produces an unknown option warning in Visual Studio. - if(NOT CMAKE_CL_64) -diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt -index db42c2f..dffb19e 100644 ---- a/docs/CMakeLists.txt -+++ b/docs/CMakeLists.txt -@@ -55,7 +55,7 @@ set(SPHINX_VERSION 1.2b3) - ExternalProject_Add(Sphinx - DEPENDS setuptools docutils Jinja2 Pygments - URL ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.tar.gz -- PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.patch -+ PATCH_COMMAND ${PATCH} --binary -p1 < ${CMAKE_SOURCE_DIR}/ext/Sphinx-${SPHINX_VERSION}.patch - BUILD_IN_SOURCE 1 - CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${EXTDIST_PYTHONPATH} - BUILD_COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON} setup.py build -diff --git a/src/core/Platform.h b/src/core/Platform.h -index d2d3f30..e3afa19 100644 ---- a/src/core/Platform.h -+++ b/src/core/Platform.h -@@ -75,7 +75,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - #define NOMINMAX 1 - - // windows - defined for both Win32 and Win64 --#include -+#include - #include - #include - #include diff --git a/3rdparty/ext_ocio/patch_mingw.patch b/3rdparty/ext_ocio/patch_mingw.patch deleted file mode 100644 index fb6147fa69..0000000000 --- a/3rdparty/ext_ocio/patch_mingw.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 13e2d64..47b5297 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -171,7 +171,7 @@ else(USE_EXTERNAL_TINYXML) - INSTALL_DIR ext/dist - CMAKE_ARGS ${TINYXML_CMAKE_ARGS} - ) -- if(WIN32) -+ if(MSVC) - set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib) - else() - set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libtinyxml.a) -@@ -211,7 +211,7 @@ else(USE_EXTERNAL_YAML) - ) - set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include) - set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib) -- if(WIN32) -+ if(MSVC) - set(YAML_CPP_STATIC_DEBUG_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cppmdd.lib) - set(YAML_CPP_STATIC_OPTIMIZED_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cppmd.lib) - else() -@@ -271,7 +271,7 @@ endif() - messageonce("SSE Optimizations: ${OCIO_USE_SSE}") - - if(OCIO_USE_SSE) -- if(WIN32) -+ if(MSVC) - # SSE instructions are automatically compiled into 64-bit applications so enabling the option is redundant and - # actually produces an unknown option warning in Visual Studio. - if(NOT CMAKE_CL_64) -diff --git a/src/core/Platform.h b/src/core/Platform.h -index d2d3f30..e3afa19 100644 ---- a/src/core/Platform.h -+++ b/src/core/Platform.h -@@ -75,7 +75,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - #define NOMINMAX 1 - - // windows - defined for both Win32 and Win64 --#include -+#include - #include - #include - #include \ No newline at end of file