external_libs: Add openjpeg to the mavc lib folders for cycles standalone.
authorRay Molenkamp <github@lazydodo.com>
Wed, 17 Jan 2018 14:45:05 +0000 (07:45 -0700)
committerRay Molenkamp <github@lazydodo.com>
Wed, 17 Jan 2018 14:45:05 +0000 (07:45 -0700)
build_files/build_environment/cmake/openjpeg.cmake

index 16ac387ff547eb43190c93c70c66f29bb35e2d2e..37f9e6de32b323e1ae89e5626dce93792207bf96 100644 (file)
@@ -49,6 +49,13 @@ if(MSVC)
                CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF 
                INSTALL_DIR ${LIBDIR}/openjpeg_msvc
        )
+       if(BUILD_MODE STREQUAL Release)
+               ExternalProject_Add_Step(external_openjpeg_msvc after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
+                                       ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
+                       DEPENDEES install
+               )
+       endif()
 endif()
 
 set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})