deps build: add openjpeg to OIIO
authorArto Kitula <arto.kitula@gmail.com>
Thu, 21 Sep 2017 19:09:52 +0000 (22:09 +0300)
committerArto Kitula <arto.kitula@gmail.com>
Thu, 21 Sep 2017 19:09:52 +0000 (22:09 +0300)
build_files/build_environment/cmake/openimageio.cmake
build_files/build_environment/cmake/openjpeg.cmake

index f323161d5f2f7a06ab530bc86169b8695fcd1d13..b36e883e93c19e83a8fd1b60c2e1a7c3d569ebb9 100644 (file)
@@ -59,7 +59,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
        -DUSE_GIF=OFF
        -DUSE_OPENCV=OFF
        -DUSE_OPENSSL=OFF
-       -DUSE_OPENJPEG=OFF
+       -DUSE_OPENJPEG=ON
        -DUSE_FFMPEG=OFF
        -DUSE_PTEX=OFF
        -DUSE_FREETYPE=OFF
@@ -78,6 +78,8 @@ set(OPENIMAGEIO_EXTRA_ARGS
        -DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
        -DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
        -DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
+       -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_VERSION}
+       -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
        -DOCIO_PATH=${LIBDIR}/opencolorio/
        -DOpenEXR_USE_STATIC_LIBS=On
        -DOPENEXR_HOME=${LIBDIR}/openexr/
@@ -107,7 +109,7 @@ ExternalProject_Add(external_openimageio
        INSTALL_DIR ${LIBDIR}/openimageio
 )
 
-add_dependencies(external_openimageio external_png external_zlib external_ilmbase external_openexr external_jpeg external_boost external_tiff external_webp external_opencolorio)
+add_dependencies(external_openimageio external_png external_zlib external_ilmbase external_openexr external_jpeg external_boost external_tiff external_webp external_opencolorio external_openjpeg)
 if(NOT WIN32)
        add_dependencies(external_openimageio external_opencolorio_extra)
 endif()
index 66f815034eb5b1f44eb7a4d340a3ded55a897104..0183b11cf413a61b402a96e10eddba5d0f00abf0 100644 (file)
@@ -38,6 +38,7 @@ ExternalProject_Add(external_openjpeg
        INSTALL_DIR ${LIBDIR}/openjpeg
 )
 
+       set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
 if(MSVC)
        set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
 endif(MSVC)