build_environment: cleanup for osl harvesting on windows.
authorRay Molenkamp <github@lazydodo.com>
Tue, 21 Aug 2018 14:15:45 +0000 (08:15 -0600)
committerRay Molenkamp <github@lazydodo.com>
Tue, 21 Aug 2018 16:49:41 +0000 (10:49 -0600)
build_files/build_environment/cmake/harvest.cmake
build_files/build_environment/cmake/osl.cmake
build_files/build_environment/cmake/pugixml.cmake

index 44349f78db6c83c3f70c6e964f47b4cc3dfde0c1..57b76fdd1bd0685db7e5b13f64e9cc16dd0df7be 100644 (file)
@@ -54,8 +54,6 @@ if(BUILD_MODE STREQUAL Release)
                                # tiff
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
-                               # Osl
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl &&
                                # BlendThumb
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
@@ -72,10 +70,6 @@ if(BUILD_MODE STREQUAL Debug)
                                # OpenImageIO
                COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
-                               # osl
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib &&
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib &&
-                               ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib &&
                                # python
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
                                # hdf5
index 73e62f73cf2b4af86fbfad5405f3856c734c8e80..e73a4041405322f8e1b5d9bf3afa385a55810959 100644 (file)
@@ -101,3 +101,23 @@ add_dependencies(
        external_openimageio
        external_pugixml
 )
+
+if(WIN32)
+       if(BUILD_MODE STREQUAL Release)
+               ExternalProject_Add_Step(external_osl after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl
+                       DEPENDEES install
+               )
+       endif()
+       if(BUILD_MODE STREQUAL Debug)
+               ExternalProject_Add_Step(external_osl after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib
+                       DEPENDEES install
+               )
+       endif()
+endif()
+
+
+
index bb1cb985e37b2599c8dd7864e4a5a9921c4f157e..fe5a77efa33d8fa8edf3c8b1ede857fb1fcaf5ec 100644 (file)
@@ -27,10 +27,17 @@ ExternalProject_Add(external_pugixml
        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
        INSTALL_DIR ${LIBDIR}/pugixml
 )
-
-#if(BUILD_MODE STREQUAL Release AND WIN32)
-       #ExternalProject_Add_Step(external_freetype after_install
-       #       COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
-       #       DEPENDEES install
-       #)
-#endif()
+if(WIN32)
+       if(BUILD_MODE STREQUAL Release)
+               ExternalProject_Add_Step(external_pugixml after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
+                       DEPENDEES install
+               )
+       endif()
+       if(BUILD_MODE STREQUAL Debug)
+               ExternalProject_Add_Step(external_pugixml after_install
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
+                       DEPENDEES install
+               )
+       endif() 
+endif()
\ No newline at end of file