diff options
Diffstat (limited to 'build_files/build_environment')
32 files changed, 255 insertions, 128 deletions
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index 9f7eb3c2c50..885133f970c 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -78,7 +78,7 @@ include(cmake/openvdb.cmake) include(cmake/python.cmake) include(cmake/python_site_packages.cmake) include(cmake/numpy.cmake) -if (WITH_WEBP) +if(WITH_WEBP) include(cmake/webp.cmake) endif() if(WIN32) diff --git a/build_files/build_environment/cmake/alembic.cmake b/build_files/build_environment/cmake/alembic.cmake index a49047ec102..cf2cefa2e7a 100644 --- a/build_files/build_environment/cmake/alembic.cmake +++ b/build_files/build_environment/cmake/alembic.cmake @@ -72,4 +72,9 @@ ExternalProject_Add(external_alembic INSTALL_DIR ${LIBDIR}/alembic ) -add_dependencies(external_alembic external_boost external_zlib external_ilmbase) +add_dependencies( + external_alembic + external_boost + external_zlib + external_ilmbase +) diff --git a/build_files/build_environment/cmake/blendthumb.cmake b/build_files/build_environment/cmake/blendthumb.cmake index 624869971c6..b3064016403 100644 --- a/build_files/build_environment/cmake/blendthumb.cmake +++ b/build_files/build_environment/cmake/blendthumb.cmake @@ -47,7 +47,10 @@ if(BUILD_MODE STREQUAL Release) CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib INSTALL_DIR ${LIBDIR}/blendthumb32 ) - add_dependencies(external_blendthumb_32 external_zlib_32) + add_dependencies( + external_blendthumb_32 + external_zlib_32 + ) ExternalProject_Add(external_blendthumb_64 CMAKE_GENERATOR ${GENERATOR_64} @@ -56,6 +59,9 @@ if(BUILD_MODE STREQUAL Release) CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib INSTALL_DIR ${LIBDIR}/blendthumb64 ) - add_dependencies(external_blendthumb_64 external_zlib_64) + add_dependencies( + external_blendthumb_64 + external_zlib_64 + ) endif() endif() diff --git a/build_files/build_environment/cmake/blosc.cmake b/build_files/build_environment/cmake/blosc.cmake index 68df525b802..606fe8c61cc 100644 --- a/build_files/build_environment/cmake/blosc.cmake +++ b/build_files/build_environment/cmake/blosc.cmake @@ -37,7 +37,13 @@ ExternalProject_Add(external_blosc INSTALL_DIR ${LIBDIR}/blosc ) -add_dependencies(external_blosc external_zlib) +add_dependencies( + external_blosc + external_zlib +) if(WIN32) - add_dependencies(external_blosc external_pthreads) + add_dependencies( + external_blosc + external_pthreads + ) endif() diff --git a/build_files/build_environment/cmake/boost.cmake b/build_files/build_environment/cmake/boost.cmake index d98df30a38f..2c6bf195e07 100644 --- a/build_files/build_environment/cmake/boost.cmake +++ b/build_files/build_environment/cmake/boost.cmake @@ -103,5 +103,8 @@ ExternalProject_Add(external_boost ) if(WIN32) - add_dependencies(external_boost Make_Python_Environment) + add_dependencies( + external_boost + Make_Python_Environment + ) endif() diff --git a/build_files/build_environment/cmake/clang.cmake b/build_files/build_environment/cmake/clang.cmake index 2c7f271b5fc..9a2705bc8be 100644 --- a/build_files/build_environment/cmake/clang.cmake +++ b/build_files/build_environment/cmake/clang.cmake @@ -32,15 +32,15 @@ ExternalProject_Add(external_clang INSTALL_DIR ${LIBDIR}/clang ) -if (MSVC) - if (BUILD_MODE STREQUAL Release) - set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/ ) +if(MSVC) + if(BUILD_MODE STREQUAL Release) + set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/) else() set(CLANG_HARVEST_COMMAND - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/ - ) + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ && + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ && + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/ + ) endif() ExternalProject_Add_Step(external_clang after_install COMMAND ${CLANG_HARVEST_COMMAND} @@ -48,4 +48,7 @@ if (MSVC) ) endif() -add_dependencies(external_clang ll) +add_dependencies( + external_clang + ll +) diff --git a/build_files/build_environment/cmake/ffmpeg.cmake b/build_files/build_environment/cmake/ffmpeg.cmake index 2a45849acf5..bd49621bf26 100644 --- a/build_files/build_environment/cmake/ffmpeg.cmake +++ b/build_files/build_environment/cmake/ffmpeg.cmake @@ -30,13 +30,14 @@ if(WIN32) --enable-w32threads --disable-pthreads --enable-libopenjpeg - ) + ) else() set(FFMPEG_EXTRA_FLAGS ${FFMPEG_EXTRA_FLAGS} --enable-static --disable-shared - --enable-libopenjpeg) + --enable-libopenjpeg + ) endif() if(APPLE) @@ -102,18 +103,34 @@ ExternalProject_Add(external_ffmpeg --disable-indev=jack --disable-indev=alsa --disable-outdev=alsa - PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff - BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS} - INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS} - INSTALL_DIR ${LIBDIR}/ffmpeg + PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff + BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS} + INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS} + INSTALL_DIR ${LIBDIR}/ffmpeg ) if(MSVC) set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw) -endif(MSVC) +endif() -add_dependencies(external_ffmpeg external_zlib external_faad external_openjpeg external_xvidcore external_x264 external_schroedinger external_vpx external_theora external_vorbis external_ogg external_lame) +add_dependencies( + external_ffmpeg + external_zlib + external_faad + external_openjpeg + external_xvidcore + external_x264 + external_schroedinger + external_vpx + external_theora + external_vorbis + external_ogg + external_lame +) if(WIN32) - add_dependencies(external_ffmpeg external_zlib_mingw) + add_dependencies( + external_ffmpeg + external_zlib_mingw + ) endif() diff --git a/build_files/build_environment/cmake/fftw.cmake b/build_files/build_environment/cmake/fftw.cmake index e6e6165199c..3044e28078d 100644 --- a/build_files/build_environment/cmake/fftw.cmake +++ b/build_files/build_environment/cmake/fftw.cmake @@ -37,4 +37,4 @@ ExternalProject_Add(external_fftw3 if(MSVC) set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw) -endif(MSVC) +endif() diff --git a/build_files/build_environment/cmake/flac.cmake b/build_files/build_environment/cmake/flac.cmake index 74d222632d0..f5ef5809b40 100644 --- a/build_files/build_environment/cmake/flac.cmake +++ b/build_files/build_environment/cmake/flac.cmake @@ -29,4 +29,4 @@ ExternalProject_Add(external_flac if(MSVC) set_target_properties(external_flac PROPERTIES FOLDER Mingw) -endif(MSVC) +endif() diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index a430c4b33bf..f23939a7ba6 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -26,7 +26,6 @@ endif() message("HARVEST_TARGET = ${HARVEST_TARGET}") if(WIN32) - if(BUILD_MODE STREQUAL Release) add_custom_target(Harvest_Release_Results # Zlib Rename the lib file and copy the include/bin folders @@ -117,8 +116,8 @@ if(BUILD_MODE STREQUAL Release) # webp, straight up copy ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp DEPENDS -) -endif(BUILD_MODE STREQUAL Release) + ) +endif() if(BUILD_MODE STREQUAL Debug) add_custom_target(Harvest_Debug_Results @@ -169,8 +168,8 @@ if(BUILD_MODE STREQUAL Debug) # python ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz DEPENDS Package_Python -) -endif(BUILD_MODE STREQUAL Debug) + ) +endif() else(WIN32) @@ -276,4 +275,4 @@ harvest(x264/lib ffmpeg/lib "*.a") harvest(xml2/lib opencollada/lib "*.a") harvest(xvidcore/lib ffmpeg/lib "*.a") -endif(WIN32) +endif() diff --git a/build_files/build_environment/cmake/hdf5.cmake b/build_files/build_environment/cmake/hdf5.cmake index 09d40d0605f..63ad14761da 100644 --- a/build_files/build_environment/cmake/hdf5.cmake +++ b/build_files/build_environment/cmake/hdf5.cmake @@ -32,11 +32,11 @@ if(WIN32) endif() ExternalProject_Add(external_hdf5 - URL ${HDF5_URI} - DOWNLOAD_DIR ${DOWNLOAD_DIR} - URL_HASH MD5=${HDF5_HASH} - PREFIX ${BUILD_DIR}/hdf5 - PATCH_COMMAND ${HDF5_PATCH} - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS} - INSTALL_DIR ${LIBDIR}/hdf5 + URL ${HDF5_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH MD5=${HDF5_HASH} + PREFIX ${BUILD_DIR}/hdf5 + PATCH_COMMAND ${HDF5_PATCH} + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS} + INSTALL_DIR ${LIBDIR}/hdf5 ) diff --git a/build_files/build_environment/cmake/llvm.cmake b/build_files/build_environment/cmake/llvm.cmake index f04fe609cb3..60f94b3a499 100644 --- a/build_files/build_environment/cmake/llvm.cmake +++ b/build_files/build_environment/cmake/llvm.cmake @@ -43,15 +43,15 @@ ExternalProject_Add(ll INSTALL_DIR ${LIBDIR}/llvm ) -if (MSVC) - if (BUILD_MODE STREQUAL Release) +if(MSVC) + if(BUILD_MODE STREQUAL Release) set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ ) else() set(LLVM_HARVEST_COMMAND - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/ - ) + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ && + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ && + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/ + ) endif() ExternalProject_Add_Step(ll after_install COMMAND ${LLVM_HARVEST_COMMAND} diff --git a/build_files/build_environment/cmake/numpy.cmake b/build_files/build_environment/cmake/numpy.cmake index 107947dabd3..3579042981f 100644 --- a/build_files/build_environment/cmake/numpy.cmake +++ b/build_files/build_environment/cmake/numpy.cmake @@ -25,7 +25,7 @@ if(MSVC) set(NUMPY_DIR_POSTFIX) set(NUMPY_ARCHIVE_POSTFIX) set(NUMPY_BUILD_OPTION) - endif(BUILD_MODE STREQUAL Debug) + endif() endif() set(NUMPY_POSTFIX) @@ -54,4 +54,7 @@ ExternalProject_Add(external_numpy INSTALL_COMMAND ${NUMPY_INSTALL} ) -add_dependencies(external_numpy Make_Python_Environment) +add_dependencies( + external_numpy + Make_Python_Environment +) diff --git a/build_files/build_environment/cmake/opencollada.cmake b/build_files/build_environment/cmake/opencollada.cmake index 9b2a2d9dc4d..3872b08ced2 100644 --- a/build_files/build_environment/cmake/opencollada.cmake +++ b/build_files/build_environment/cmake/opencollada.cmake @@ -33,5 +33,8 @@ ExternalProject_Add(external_opencollada ) if(UNIX AND NOT APPLE) - add_dependencies(external_opencollada external_xml2) + add_dependencies( + external_opencollada + external_xml2 + ) endif() diff --git a/build_files/build_environment/cmake/opencolorio.cmake b/build_files/build_environment/cmake/opencolorio.cmake index 14fb62af672..d33c03eaa8d 100644 --- a/build_files/build_environment/cmake/opencolorio.cmake +++ b/build_files/build_environment/cmake/opencolorio.cmake @@ -67,4 +67,7 @@ if(NOT WIN32) add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a) endif() -add_dependencies(external_opencolorio external_boost) +add_dependencies( + external_opencolorio + external_boost +) diff --git a/build_files/build_environment/cmake/openexr.cmake b/build_files/build_environment/cmake/openexr.cmake index 53a1bc4c146..36283951750 100644 --- a/build_files/build_environment/cmake/openexr.cmake +++ b/build_files/build_environment/cmake/openexr.cmake @@ -38,4 +38,8 @@ ExternalProject_Add(external_openexr INSTALL_DIR ${LIBDIR}/openexr ) -add_dependencies(external_openexr external_zlib external_ilmbase) +add_dependencies( + external_openexr + external_zlib + external_ilmbase +) diff --git a/build_files/build_environment/cmake/openimageio.cmake b/build_files/build_environment/cmake/openimageio.cmake index 96b221388da..07f6b3cdbef 100644 --- a/build_files/build_environment/cmake/openimageio.cmake +++ b/build_files/build_environment/cmake/openimageio.cmake @@ -39,21 +39,25 @@ else() set(OIIO_SIMD_FLAGS) endif() -if (WITH_WEBP) - set(WEBP_ARGS -DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include - -DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT} ) +if(WITH_WEBP) + set(WEBP_ARGS + -DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include + -DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT} + ) set(WEBP_DEP external_webp) -endif() +endif() -if (MSVC) -set(OPENJPEG_FLAGS -DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc - -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION} - -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT} - -DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT} - ) +if(MSVC) + set(OPENJPEG_FLAGS + -DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc + -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION} + -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT} + -DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT} + ) else() -set(OPENJPEG_FLAGS -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION} - -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY} + set(OPENJPEG_FLAGS + -DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION} + -DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY} ) endif() @@ -120,13 +124,28 @@ ExternalProject_Add(external_openimageio DOWNLOAD_DIR ${DOWNLOAD_DIR} URL_HASH MD5=${OPENIMAGEIO_HASH} PREFIX ${BUILD_DIR}/openimageio - PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff && - ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_staticexr.diff + PATCH_COMMAND + ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff && + ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_staticexr.diff CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/openimageio ) -add_dependencies(external_openimageio external_png external_zlib external_ilmbase external_openexr external_jpeg external_boost external_tiff external_opencolorio external_openjpeg${OPENJPEG_POSTFIX} ${WEBP_DEP}) +add_dependencies( + external_openimageio + external_png external_zlib + external_ilmbase + external_openexr + external_jpeg + external_boost + external_tiff + external_opencolorio + external_openjpeg${OPENJPEG_POSTFIX} + ${WEBP_DEP} +) if(NOT WIN32) - add_dependencies(external_openimageio external_opencolorio_extra) + add_dependencies( + external_openimageio + external_opencolorio_extra + ) endif() diff --git a/build_files/build_environment/cmake/openjpeg.cmake b/build_files/build_environment/cmake/openjpeg.cmake index 406badf31fe..16ac387ff54 100644 --- a/build_files/build_environment/cmake/openjpeg.cmake +++ b/build_files/build_environment/cmake/openjpeg.cmake @@ -39,19 +39,19 @@ ExternalProject_Add(external_openjpeg ) #on windows ffmpeg wants a mingw build, while oiio needs a msvc build -if (MSVC) +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 -) + 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}) +set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT}) if(MSVC) set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw) -endif(MSVC) +endif() diff --git a/build_files/build_environment/cmake/opensubdiv.cmake b/build_files/build_environment/cmake/opensubdiv.cmake index 5a3a4d142fa..ca3a6983b22 100644 --- a/build_files/build_environment/cmake/opensubdiv.cmake +++ b/build_files/build_environment/cmake/opensubdiv.cmake @@ -68,4 +68,10 @@ ExternalProject_Add(external_opensubdiv INSTALL_DIR ${LIBDIR}/opensubdiv ) -add_dependencies(external_opensubdiv external_glew external_glfw external_clew external_cuew) +add_dependencies( + external_opensubdiv + external_glew + external_glfw + external_clew + external_cuew +) diff --git a/build_files/build_environment/cmake/openvdb.cmake b/build_files/build_environment/cmake/openvdb.cmake index a71598c1a3b..26791012688 100644 --- a/build_files/build_environment/cmake/openvdb.cmake +++ b/build_files/build_environment/cmake/openvdb.cmake @@ -61,11 +61,20 @@ ExternalProject_Add(openvdb DOWNLOAD_DIR ${DOWNLOAD_DIR} URL_HASH MD5=${OPENVDB_HASH} PREFIX ${BUILD_DIR}/openvdb - PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_openvdb.txt ${BUILD_DIR}/openvdb/src/openvdb/CMakeLists.txt && - ${CMAKE_COMMAND} -E copy_directory ${PATCH_DIR}/cmake/ ${BUILD_DIR}/openvdb/src/openvdb/cmake/ && - ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_vc2013.diff + PATCH_COMMAND COMMAND + ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_openvdb.txt ${BUILD_DIR}/openvdb/src/openvdb/CMakeLists.txt && + ${CMAKE_COMMAND} -E copy_directory ${PATCH_DIR}/cmake/ ${BUILD_DIR}/openvdb/src/openvdb/cmake/ && + ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_vc2013.diff CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/openvdb ) -add_dependencies(openvdb external_tbb external_boost external_ilmbase external_openexr external_zlib external_blosc) +add_dependencies( + openvdb + external_tbb + external_boost + external_ilmbase + external_openexr + external_zlib + external_blosc +) diff --git a/build_files/build_environment/cmake/options.cmake b/build_files/build_environment/cmake/options.cmake index 9979a682614..2dcf653db43 100644 --- a/build_files/build_environment/cmake/options.cmake +++ b/build_files/build_environment/cmake/options.cmake @@ -26,13 +26,13 @@ if(NOT BUILD_MODE) set(BUILD_MODE "Release") message(STATUS "Build type not specified: defaulting to a release build.") endif() -Message("BuildMode = ${BUILD_MODE}") +message("BuildMode = ${BUILD_MODE}") if(BUILD_MODE STREQUAL "Debug") set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug) -ELSE(BUILD_MODE STREQUAL "Debug") +else(BUILD_MODE STREQUAL "Debug") set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release) -ENDIF(BUILD_MODE STREQUAL "Debug") +endif() option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads) file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR) @@ -116,10 +116,11 @@ else() set(LIBPREFIX "lib") if(APPLE) -# Let's get the current Xcode dir, to support xcode-select - execute_process( + # Let's get the current Xcode dir, to support xcode-select + execute_process( COMMAND xcode-select --print-path - OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) + OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE + ) set(OSX_ARCHITECTURES x86_64) set(OSX_DEPLOYMENT_TARGET 10.9) set(OSX_SDK_VERSION 10.12) @@ -130,9 +131,9 @@ else() set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}") set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9 set(PLATFORM_CMAKE_FLAGS - -DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES} - -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET} - -DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT} + -DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES} + -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET} + -DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT} ) else() set(PLATFORM_CFLAGS "-fPIC") diff --git a/build_files/build_environment/cmake/osl.cmake b/build_files/build_environment/cmake/osl.cmake index 5ddb981c604..ad4d0ee6038 100644 --- a/build_files/build_environment/cmake/osl.cmake +++ b/build_files/build_environment/cmake/osl.cmake @@ -78,10 +78,21 @@ ExternalProject_Add(external_osl LIST_SEPARATOR ^^ URL_HASH MD5=${OSL_HASH} PREFIX ${BUILD_DIR}/osl - PATCH_COMMAND ${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff && - ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff + PATCH_COMMAND + ${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff && + ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/osl ) -add_dependencies(external_osl external_boost ll external_clang external_ilmbase external_openexr external_zlib external_flexbison external_openimageio) +add_dependencies( + external_osl + external_boost + ll + external_clang + external_ilmbase + external_openexr + external_zlib + external_flexbison + external_openimageio +) diff --git a/build_files/build_environment/cmake/png.cmake b/build_files/build_environment/cmake/png.cmake index 8d6fee871f9..803438cbd2a 100644 --- a/build_files/build_environment/cmake/png.cmake +++ b/build_files/build_environment/cmake/png.cmake @@ -31,7 +31,10 @@ ExternalProject_Add(external_png INSTALL_DIR ${LIBDIR}/png ) -add_dependencies(external_png external_zlib) +add_dependencies( + external_png + external_zlib +) if(BUILD_MODE STREQUAL Debug) ExternalProject_Add_Step(external_png after_install diff --git a/build_files/build_environment/cmake/pthreads.cmake b/build_files/build_environment/cmake/pthreads.cmake index f4301b95f3a..c93f0866aa9 100644 --- a/build_files/build_environment/cmake/pthreads.cmake +++ b/build_files/build_environment/cmake/pthreads.cmake @@ -35,11 +35,12 @@ if(WIN32) CONFIGURE_COMMAND echo . PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff BUILD_COMMAND ${PTHREADS_BUILD} - INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll && - ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} && - ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h && - ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h && - ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h + INSTALL_COMMAND COMMAND + ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll && + ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} && + ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h && + ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h && + ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h INSTALL_DIR ${LIBDIR}/pthreads ) endif() diff --git a/build_files/build_environment/cmake/python.cmake b/build_files/build_environment/cmake/python.cmake index 98d9d4ae63e..693ab1896ba 100644 --- a/build_files/build_environment/cmake/python.cmake +++ b/build_files/build_environment/cmake/python.cmake @@ -44,20 +44,22 @@ if(WIN32) DOWNLOAD_DIR ${DOWNLOAD_DIR} URL_HASH MD5=${PYTHON_HASH} PREFIX ${BUILD_DIR}/python - PATCH_COMMAND echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" && - mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" && - ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python.diff && - ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/pc < ${PATCH_DIR}/pyshell.diff + PATCH_COMMAND + echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" && + mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" && + ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python.diff && + ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/pc < ${PATCH_DIR}/pyshell.diff CONFIGURE_COMMAND "" BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE} -k ${PYTHON_COMPILER_STRING} - INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll && - ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib && - ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp && - ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} && - ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h + INSTALL_COMMAND COMMAND + ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll && + ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib && + ${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp && + ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} && + ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h ) - Message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist") - Message("POutput = ${PYTHON_OUTPUTDIR}") + message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist") + message("POutput = ${PYTHON_OUTPUTDIR}") else() if(APPLE) # we need to manually add homebrew headers to get ssl module building @@ -135,4 +137,4 @@ if(MSVC) COMMAND ${PYTHON_DISTUTIL_PATCH} ) add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python) -endif(MSVC) +endif() diff --git a/build_files/build_environment/cmake/python_site_packages.cmake b/build_files/build_environment/cmake/python_site_packages.cmake index 530bae4c958..0619bc3f887 100644 --- a/build_files/build_environment/cmake/python_site_packages.cmake +++ b/build_files/build_environment/cmake/python_site_packages.cmake @@ -17,14 +17,14 @@ # ***** END GPL LICENSE BLOCK ***** if(WIN32) set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" && - ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna && - ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet && - ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 && - ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi && - ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests - ) + ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna && + ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet && + ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 && + ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi && + ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests + ) else() - set(HARVEST_CMD echo .) + set(HARVEST_CMD echo .) endif() ExternalProject_Add(external_python_site_packages @@ -35,4 +35,7 @@ ExternalProject_Add(external_python_site_packages INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD} ) -add_dependencies(external_python_site_packages Make_Python_Environment) +add_dependencies( + external_python_site_packages + Make_Python_Environment +) diff --git a/build_files/build_environment/cmake/schroedinger.cmake b/build_files/build_environment/cmake/schroedinger.cmake index 54a20db5b5e..80bf84b06d7 100644 --- a/build_files/build_environment/cmake/schroedinger.cmake +++ b/build_files/build_environment/cmake/schroedinger.cmake @@ -38,7 +38,10 @@ ExternalProject_Add(external_schroedinger INSTALL_DIR ${LIBDIR}/schroedinger ) -add_dependencies(external_schroedinger external_orc) +add_dependencies( + external_schroedinger + external_orc +) if(MSVC) set_target_properties(external_schroedinger PROPERTIES FOLDER Mingw) diff --git a/build_files/build_environment/cmake/sndfile.cmake b/build_files/build_environment/cmake/sndfile.cmake index ce10f07c133..282033d4905 100644 --- a/build_files/build_environment/cmake/sndfile.cmake +++ b/build_files/build_environment/cmake/sndfile.cmake @@ -49,7 +49,14 @@ if(MSVC) set_target_properties(external_sndfile PROPERTIES FOLDER Mingw) endif() -add_dependencies(external_sndfile external_ogg external_vorbis) +add_dependencies( + external_sndfile + external_ogg + external_vorbis +) if(UNIX) - add_dependencies(external_sndfile external_flac) + add_dependencies( + external_sndfile + external_flac + ) endif() diff --git a/build_files/build_environment/cmake/theora.cmake b/build_files/build_environment/cmake/theora.cmake index 03aad42f2db..4fa2f4815fa 100644 --- a/build_files/build_environment/cmake/theora.cmake +++ b/build_files/build_environment/cmake/theora.cmake @@ -33,7 +33,11 @@ ExternalProject_Add(external_theora INSTALL_DIR ${LIBDIR}/theora ) -add_dependencies(external_theora external_vorbis external_ogg) +add_dependencies( + external_theora + external_vorbis + external_ogg +) if(MSVC) set_target_properties(external_theora PROPERTIES FOLDER Mingw) diff --git a/build_files/build_environment/cmake/tiff.cmake b/build_files/build_environment/cmake/tiff.cmake index 2c01341eb21..0f22daf05b1 100644 --- a/build_files/build_environment/cmake/tiff.cmake +++ b/build_files/build_environment/cmake/tiff.cmake @@ -34,7 +34,10 @@ ExternalProject_Add(external_tiff INSTALL_DIR ${LIBDIR}/tiff ) -add_dependencies(external_tiff external_zlib) +add_dependencies( + external_tiff + external_zlib +) if(BUILD_MODE STREQUAL Debug) ExternalProject_Add_Step(external_tiff after_install diff --git a/build_files/build_environment/cmake/vorbis.cmake b/build_files/build_environment/cmake/vorbis.cmake index d16c7c6a1bc..ee3c5a9c87f 100644 --- a/build_files/build_environment/cmake/vorbis.cmake +++ b/build_files/build_environment/cmake/vorbis.cmake @@ -31,7 +31,10 @@ ExternalProject_Add(external_vorbis INSTALL_DIR ${LIBDIR}/vorbis ) -add_dependencies(external_vorbis external_ogg) +add_dependencies( + external_vorbis + external_ogg +) if(MSVC) set_target_properties(external_vorbis PROPERTIES FOLDER Mingw) diff --git a/build_files/build_environment/patches/cmake/modules/SelectLibraryConfigurations.cmake b/build_files/build_environment/patches/cmake/modules/SelectLibraryConfigurations.cmake index 51b4dda0653..47234ced74a 100644 --- a/build_files/build_environment/patches/cmake/modules/SelectLibraryConfigurations.cmake +++ b/build_files/build_environment/patches/cmake/modules/SelectLibraryConfigurations.cmake @@ -49,7 +49,7 @@ macro( select_library_configurations basename ) # if only the debug version was found, set the release value to be the # debug value. _set_library_name( ${basename} DEBUG RELEASE ) - if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE ) + if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE ) # if the generator supports configuration types or CMAKE_BUILD_TYPE # is set, then set optimized and debug options. if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) |