build_environment: Various tweaks needed for windows debug libs.
authorRay Molenkamp <github@lazydodo.com>
Fri, 17 Aug 2018 15:20:40 +0000 (09:20 -0600)
committerRay Molenkamp <github@lazydodo.com>
Fri, 17 Aug 2018 15:20:40 +0000 (09:20 -0600)
build_files/build_environment/cmake/alembic.cmake
build_files/build_environment/cmake/numpy.cmake
build_files/build_environment/cmake/openexr.cmake
build_files/build_environment/cmake/openvdb.cmake
build_files/build_environment/cmake/osl.cmake
build_files/build_environment/cmake/versions.cmake

index b2e5a3d6754dcef9608a9e7410ec1ed669a1bb06..5ca142be124e09c8ea171ba6fee2375273c05dc3 100644 (file)
@@ -82,7 +82,7 @@ if(WIN32)
        endif()
        if(BUILD_MODE STREQUAL Debug)
                ExternalProject_Add_Step(external_alembic after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib &&
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib
                        DEPENDEES install
                )
        endif() 
index fa8d9ebccba9477056b8e89f7814800dd4ee700d..698fae4f666df3aa14754f22909f4ecf698f25a3 100644 (file)
@@ -55,7 +55,7 @@ ExternalProject_Add(external_numpy
 
 if(WIN32)
        ExternalProject_Add_Step(external_numpy after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz
+                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
                        DEPENDEES install
                )
 endif()
index f0fad5e90394de97a63058abb2d48ff502a7b9d5..3e5ef5d8f0a24cc6a88957747c45ed01d5c679e1 100644 (file)
@@ -44,7 +44,7 @@ if(WIN32)
        ExternalProject_Add_Step(external_openexr after_install
                COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
                #libs have moved between versions, just duplicate it for now. 
-               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/ilmbase/lib
+               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${LIBDIR}/ilmbase/lib
                COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include 
                DEPENDEES install
        )
index 69dff9b2b5750e6be88d7a65555539f807b6b8f2..5b70d18420177f0bb85951bd204da5c31e292d30 100644 (file)
@@ -32,6 +32,7 @@ set(OPENVDB_EXTRA_ARGS
        -DWITH_BLOSC=ON
        -DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
        -DBLOSC_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
+       -DBLOSC_blosc_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
        -DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
        -DOPENVDB_BUILD_UNITTESTS=Off
        -DOPENVDB_BUILD_PYTHON_MODULE=Off
index add92a2fc0bc9aaf7c36161d0ca8f66a415f908c..3cab19510448ecddd2a4d071114f1d3ec41082ba 100644 (file)
@@ -25,10 +25,12 @@ if(WIN32)
        else()
                set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
        endif()
+       SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
 else()
        set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
        set(OSL_FLEX_BISON)
        set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
+       SET(OSL_PLATFORM_FLAGS)
 endif()
 
 set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Half{ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/IlmThread${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Iex${ILMBASE_VERSION_POSTFIX}.lib")
@@ -65,8 +67,7 @@ set(OSL_EXTRA_ARGS
        ${OSL_FLEX_BISON}
        -DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
        -DBUILDSTATIC=ON
-       # Don't use because it statically links pthreads, same as OIIO.
-       # -DLINKSTATIC=ON
+       ${OSL_PLATFORM_FLAGS}
        -DOSL_BUILD_PLUGINS=Off
        -DSTOP_ON_WARNING=OFF
        -DUSE_LLVM_BITCODE=OFF
index 18217f6c446a5405f7da87fc44bface3d341731c..64e87f2830c8be49135f458832be023103998fd9 100644 (file)
@@ -47,7 +47,13 @@ set(PTHREADS_SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b949
 
 set(ILMBASE_VERSION 2.3.0)
 if (WIN32)
-       set(ILMBASE_VERSION_POSTFIX -2_3_s)
+       if(BUILD_MODE STREQUAL Release)
+               set(ILMBASE_VERSION_POSTFIX -2_3_s)
+               set(OPENEXR_VERSION_POSTFIX -2_3_s)
+       else()
+               set(ILMBASE_VERSION_POSTFIX -2_3_s_d)
+               set(OPENEXR_VERSION_POSTFIX -2_3_s_d)
+       endif()
 else()
        set(ILMBASE_VERSION_POSTFIX)
 endif()
@@ -56,7 +62,6 @@ set(ILMBASE_HASH 354bf86de3b930ab87ac63619d60c860)
 
 set(OPENEXR_VERSION 2.3.0)
 if (WIN32) #release 2.3.0 tarball has broken cmake support
-       set(OPENEXR_VERSION_POSTFIX -2_3_s)
        set(OPENEXR_URI https://github.com/openexr/openexr/archive/0ac2ea34c8f3134148a5df4052e40f155b76f6fb.tar.gz)
        set(OPENEXR_HASH ed159435d508240712fbaaa21d94bafb)
 else()