Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/build_environment/cmake/openjpeg.cmake')
-rw-r--r--build_files/build_environment/cmake/openjpeg.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/build_files/build_environment/cmake/openjpeg.cmake b/build_files/build_environment/cmake/openjpeg.cmake
index 0183b11cf41..406badf31fe 100644
--- a/build_files/build_environment/cmake/openjpeg.cmake
+++ b/build_files/build_environment/cmake/openjpeg.cmake
@@ -38,6 +38,19 @@ ExternalProject_Add(external_openjpeg
INSTALL_DIR ${LIBDIR}/openjpeg
)
+#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
+if (MSVC)
+ set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
+ExternalProject_Add(external_openjpeg_msvc
+ URL ${OPENJPEG_URI}
+ DOWNLOAD_DIR ${DOWNLOAD_DIR}
+ URL_HASH SHA256=${OPENJPEG_HASH}
+ PREFIX ${BUILD_DIR}/openjpeg_msvc
+ CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
+ INSTALL_DIR ${LIBDIR}/openjpeg_msvc
+)
+endif()
+
set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)