diff options
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/build_environment/CMakeLists.txt | 20 | ||||
-rw-r--r-- | build_files/build_environment/cmake/harvest.cmake | 1 | ||||
-rw-r--r-- | build_files/build_environment/cmake/opencollada.cmake | 6 | ||||
-rw-r--r-- | build_files/build_environment/cmake/openvdb.cmake | 3 | ||||
-rw-r--r-- | build_files/build_environment/cmake/osl.cmake | 15 | ||||
-rw-r--r-- | build_files/build_environment/cmake/python.cmake | 28 | ||||
-rw-r--r-- | build_files/build_environment/cmake/ssl.cmake | 12 | ||||
-rw-r--r-- | build_files/build_environment/cmake/ssl.conf | 9 | ||||
-rw-r--r-- | build_files/build_environment/cmake/zlib.cmake | 2 | ||||
-rw-r--r-- | build_files/build_environment/patches/opencolorio.diff | 20 | ||||
-rw-r--r-- | build_files/build_environment/patches/sdl.diff | 22 |
11 files changed, 94 insertions, 44 deletions
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index 5270a2e2b3d..00e486bbb40 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -19,10 +19,10 @@ #################################################################################################### # # This is a build system used by platform maintainers to build library dependencies on -# Windows and macOS. There is some support for Linux as well, but not ready for releases. +# Windows, macOS and Linux. # -# Windows and macOS users should download the precompiled libraries in lib/, Linux users -# should run install_deps.sh for building dependencies. +# For users building Blender, we recommend using the precompiled libraries from lib/ on +# Windows and macOS, and install_deps.sh on Linux. # # WINDOWS USAGE: # Don't call this cmake file your self, use build_deps.cmd @@ -30,7 +30,7 @@ # build_deps 2015 x64 / build_deps 2015 x86 # # MAC OS X USAGE: -# Install with homebrew: brew install autoconf automake libtool yasm openssl xz +# Install with homebrew: brew install autoconf automake libtool yasm nasm # Run "make deps" from main Blender directory # # LINUX USAGE: @@ -96,14 +96,16 @@ include(cmake/pugixml.cmake) if(WITH_WEBP) include(cmake/webp.cmake) endif() + if(WIN32) - #hmd_branch_deps + # HMD branch deps include(cmake/hidapi.cmake) - #ocio deps + # OCIO deps include(cmake/tinyxml.cmake) include(cmake/yamlcpp.cmake) - #lcms is an ocio dep, but only if you build the apps, leaving it here for convenience + # LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience #include(cmake/lcms.cmake) + endif() if(NOT WIN32 OR ENABLE_MINGW64) @@ -128,16 +130,16 @@ if(NOT WIN32 OR ENABLE_MINGW64) endif() if(UNIX) include(cmake/flac.cmake) + include(cmake/xml2.cmake) if(NOT APPLE) include(cmake/spnav.cmake) include(cmake/jemalloc.cmake) - include(cmake/xml2.cmake) endif() endif() endif() endif() -if(UNIX AND NOT APPLE) +if(UNIX) include(cmake/bzip2.cmake) include(cmake/ffi.cmake) include(cmake/lzma.cmake) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index d47a5e65d3c..4ec71bf2ed2 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -110,6 +110,7 @@ endfunction() harvest(alembic/include alembic/include "*.h") harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a) +harvest(alembic/bin alembic/bin "*") harvest(boost/include boost/include "*") harvest(boost/lib boost/lib "*.a") harvest(ffmpeg/include ffmpeg/include "*.h") diff --git a/build_files/build_environment/cmake/opencollada.cmake b/build_files/build_environment/cmake/opencollada.cmake index 2f5360ba958..c9aee2bfe64 100644 --- a/build_files/build_environment/cmake/opencollada.cmake +++ b/build_files/build_environment/cmake/opencollada.cmake @@ -16,7 +16,7 @@ # # ***** END GPL LICENSE BLOCK ***** -if(UNIX AND NOT APPLE) +if(UNIX) set(OPENCOLLADA_EXTRA_ARGS -DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2 -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a) @@ -32,7 +32,7 @@ ExternalProject_Add(external_opencollada INSTALL_DIR ${LIBDIR}/opencollada ) -if(UNIX AND NOT APPLE) +if(UNIX) add_dependencies( external_opencollada external_xml2 @@ -62,4 +62,4 @@ if(WIN32) DEPENDEES install ) endif() -endif()
\ No newline at end of file +endif() diff --git a/build_files/build_environment/cmake/openvdb.cmake b/build_files/build_environment/cmake/openvdb.cmake index a550ed5decb..125c1b2df85 100644 --- a/build_files/build_environment/cmake/openvdb.cmake +++ b/build_files/build_environment/cmake/openvdb.cmake @@ -29,9 +29,7 @@ set(OPENVDB_EXTRA_ARGS -DBoost_NO_SYSTEM_PATHS=ON -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY} -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/ - -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 @@ -48,7 +46,6 @@ set(OPENVDB_EXTRA_ARGS -DOpenexr_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT} -DTBB_LIBRARYDIR=${LIBDIR}/tbb/lib -DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT} - -DTBB_LIBRARY_DIR=${LIBDIR}/tbb/lib -DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib ) diff --git a/build_files/build_environment/cmake/osl.cmake b/build_files/build_environment/cmake/osl.cmake index eaf6a62d18a..795892f29e2 100644 --- a/build_files/build_environment/cmake/osl.cmake +++ b/build_files/build_environment/cmake/osl.cmake @@ -77,10 +77,17 @@ set(OSL_EXTRA_ARGS ) if(WIN32) -set(OSL_EXTRA_ARGS - ${OSL_EXTRA_FLAGS} - -DPUGIXML_HOME=${LIBDIR}/pugixml -) + set(OSL_EXTRA_ARGS + ${OSL_EXTRA_ARGS} + -DPUGIXML_HOME=${LIBDIR}/pugixml + ) +elseif(APPLE) + # Make symbol hiding consistent with OIIO which defaults to OFF, + # avoids linker warnings on macOS + set(OSL_EXTRA_ARGS + ${OSL_EXTRA_ARGS} + -DHIDE_SYMBOLS=OFF + ) endif() ExternalProject_Add(external_osl diff --git a/build_files/build_environment/cmake/python.cmake b/build_files/build_environment/cmake/python.cmake index 22b4052189e..c61a0084b6f 100644 --- a/build_files/build_environment/cmake/python.cmake +++ b/build_files/build_environment/cmake/python.cmake @@ -67,9 +67,6 @@ if(WIN32) message("POutput = ${PYTHON_OUTPUTDIR}") else() if(APPLE) - # we need to add homebrew pkgconfig directories to get ssl, xz - - set(BREW_PKG_CONFIG "/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/xz/lib/pkgconfig") # disable functions that can be in 10.13 sdk but aren't available on 10.9 target set(PYTHON_FUNC_CONFIGS export ac_cv_func_futimens=no && @@ -83,25 +80,22 @@ else() export ac_cv_func_mkostemp=no && export ac_cv_func_mkostemps=no && export ac_cv_func_timingsafe_bcmp=no) - - set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${BREW_PKG_CONFIG} && ${PYTHON_FUNC_CONFIGS}) + set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS}) set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe) - set(PYTHON_PATCH echo .) - set(PYTHON_CONFIGURE_EXTRA_ENV echo .) - set(PYTHON_CONFIGURE_EXTRA_ARGS) else() - set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl") set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV}) - set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include") - set(PYTHON_LDFLAGS "-L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib") - set(PYTHON_CONFIGURE_EXTRA_ENV - export CFLAGS=${PYTHON_CFLAGS} && - export CPPFLAGS=${PYTHON_CFLAGS} && - export LDFLAGS=${PYTHON_LDFLAGS}) set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python) - set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff) endif() + set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl") + set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include") + set(PYTHON_LDFLAGS "-L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib") + set(PYTHON_CONFIGURE_EXTRA_ENV + export CFLAGS=${PYTHON_CFLAGS} && + export CPPFLAGS=${PYTHON_CFLAGS} && + export LDFLAGS=${PYTHON_LDFLAGS}) + set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff) + ExternalProject_Add(external_python URL ${PYTHON_URI} DOWNLOAD_DIR ${DOWNLOAD_DIR} @@ -172,7 +166,7 @@ if(MSVC) add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python) endif() -if(UNIX AND NOT APPLE) +if(UNIX) add_dependencies( external_python external_bzip2 diff --git a/build_files/build_environment/cmake/ssl.cmake b/build_files/build_environment/cmake/ssl.cmake index dd1b9957cc2..993e6f3ff6a 100644 --- a/build_files/build_environment/cmake/ssl.cmake +++ b/build_files/build_environment/cmake/ssl.cmake @@ -19,11 +19,15 @@ set(SSL_CONFIGURE_COMMAND ./Configure) set(SSL_PATCH_CMD echo .) -if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128) - set(SSL_OS_COMPILER "blender-x86_64") +if (APPLE) + set(SSL_OS_COMPILER "blender-darwin-x86_64") else() - set(SSL_OS_COMPILER "blender-x86") + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128) + set(SSL_OS_COMPILER "blender-linux-x86_64") + else() + set(SSL_OS_COMPILER "blender-linux-x86") + endif() endif() ExternalProject_Add(external_ssl diff --git a/build_files/build_environment/cmake/ssl.conf b/build_files/build_environment/cmake/ssl.conf index a9534e56291..91f4357f8d8 100644 --- a/build_files/build_environment/cmake/ssl.conf +++ b/build_files/build_environment/cmake/ssl.conf @@ -1,10 +1,15 @@ %targets = ( - "blender-x86" => { + + "blender-linux-x86" => { inherit_from => [ "linux-x86" ], cflags => add("-fPIC"), }, - "blender-x86_64" => { + "blender-linux-x86_64" => { inherit_from => [ "linux-x86_64" ], cflags => add("-fPIC"), }, + "blender-darwin-x86_64" => { + inherit_from => [ "darwin64-x86_64-cc" ], + cflags => add("-fPIC"), + }, ); diff --git a/build_files/build_environment/cmake/zlib.cmake b/build_files/build_environment/cmake/zlib.cmake index 7bf1c45e359..396bb3a318e 100644 --- a/build_files/build_environment/cmake/zlib.cmake +++ b/build_files/build_environment/cmake/zlib.cmake @@ -46,7 +46,7 @@ else() DEPENDEES install ) endif() - if (UNIX AND NOT APPLE) + if (UNIX) ExternalProject_Add_Step(external_zlib after_install COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a DEPENDEES install diff --git a/build_files/build_environment/patches/opencolorio.diff b/build_files/build_environment/patches/opencolorio.diff index 65901f969ca..c76c62c1057 100644 --- a/build_files/build_environment/patches/opencolorio.diff +++ b/build_files/build_environment/patches/opencolorio.diff @@ -11,3 +11,23 @@ index 1eb691b..cff9bd8 100644 endif() # SHARED +--- a/CMakeLists.txt 2018-09-10 22:15:29.000000000 +0200 ++++ b/CMakeLists.txt 2018-09-10 22:17:40.000000000 +0200 +@@ -229,7 +229,7 @@ + PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-whitespace ${TINYXML_PATCHFILE} + BINARY_DIR ext/build/tinyxml + INSTALL_DIR ext/dist +- CMAKE_ARGS ${TINYXML_CMAKE_ARGS} ++ CMAKE_ARGS ${TINYXML_CMAKE_ARGS} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} + ) + if(WIN32) + set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib) +@@ -343,7 +343,7 @@ + PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-whitespace ${YAML_CPP_PATCHFILE} + BINARY_DIR ext/build/yaml-cpp + INSTALL_DIR ext/dist +- CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS} ++ CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} + ) + set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include) + set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib) diff --git a/build_files/build_environment/patches/sdl.diff b/build_files/build_environment/patches/sdl.diff index d0a3bca863d..742183ecb4c 100644 --- a/build_files/build_environment/patches/sdl.diff +++ b/build_files/build_environment/patches/sdl.diff @@ -1,4 +1,4 @@ -diff -ru /Users/brecht/dev/lib/deps/Downloads/SDL2-2.0.4/src/video/SDL_video.c ./src/video/SDL_video.c +diff -ru ./src/video/SDL_video.c ./src/video/SDL_video.c --- CMakeLists.txt.old 2016-01-02 12:56:31 -0700 +++ CMakeLists.txt 2016-10-03 11:24:24 -0600 @@ -609,7 +609,7 @@ @@ -10,3 +10,23 @@ diff -ru /Users/brecht/dev/lib/deps/Downloads/SDL2-2.0.4/src/video/SDL_video.c . if(HAVE_LIBICONV) list(APPEND EXTRA_LIBS iconv) set(HAVE_ICONV 1) +--- src/video/SDL_video.c 2018-09-10 23:27:57.000000000 +0200 ++++ src/video/SDL_video.c 2018-09-10 23:28:09.000000000 +0200 +@@ -1176,7 +1176,7 @@ + return 0; + } + +-#ifdef __MACOSX__ ++#if defined(__MACOSX__) && SDL_VIDEO_DRIVER_COCOA + /* if the window is going away and no resolution change is necessary, + do nothing, or else we may trigger an ugly double-transition + */ +@@ -2563,7 +2563,7 @@ + return SDL_FALSE; + } + +-#ifdef __MACOSX__ ++#if defined(__MACOSX__) && SDL_VIDEO_DRIVER_COCOA + if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */ + if (Cocoa_IsWindowInFullscreenSpace(window)) { + return SDL_FALSE; |