diff options
Diffstat (limited to 'build_files/build_environment/cmake')
4 files changed, 56 insertions, 1 deletions
diff --git a/build_files/build_environment/cmake/embree.cmake b/build_files/build_environment/cmake/embree.cmake new file mode 100644 index 00000000000..34e5904db5e --- /dev/null +++ b/build_files/build_environment/cmake/embree.cmake @@ -0,0 +1,46 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +# Note the utility apps may use png/tiff/gif system libraries, but the +# library itself does not depend on them, so should give no problems. + +set(EMBREE_EXTRA_ARGS + -DEMBREE_ISPC_SUPPORT=OFF + -DEMBREE_TUTORIALS=OFF + -DEMBREE_STATIC_LIB=ON + -DEMBREE_RAY_MASK=ON + -DEMBREE_FILTER_FUNCTION=ON + -DEMBREE_BACKFACE_CULLING=OFF + -DEMBREE_TASKING_SYSTEM=INTERNAL + -DEMBREE_MAX_ISA=AVX2 +) + +if(WIN32) + set(EMBREE_BUILD_DIR ${BUILD_MODE}/) +else() + set(EMBREE_BUILD_DIR) +endif() + +ExternalProject_Add(external_embree + URL ${EMBREE_URI} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH MD5=${EMBREE_HASH} + PREFIX ${BUILD_DIR}/embree + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS} + INSTALL_DIR ${LIBDIR}/embree +) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index 4ec71bf2ed2..d0d8b4cefb9 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -57,7 +57,9 @@ if(BUILD_MODE STREQUAL Release) # hidapi ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ && # webp, straight up copy - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp && + # embree + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/embree ${HARVEST_TARGET}/embree DEPENDS ) endif() @@ -191,5 +193,7 @@ harvest(vpx/lib ffmpeg/lib "*.a") harvest(webp/lib ffmpeg/lib "*.a") harvest(x264/lib ffmpeg/lib "*.a") harvest(xvidcore/lib ffmpeg/lib "*.a") +harvest(embree/include embree/include "*.h") +harvest(embree/lib embree/lib "*.a") endif() diff --git a/build_files/build_environment/cmake/options.cmake b/build_files/build_environment/cmake/options.cmake index f3125551972..20e9750bed6 100644 --- a/build_files/build_environment/cmake/options.cmake +++ b/build_files/build_environment/cmake/options.cmake @@ -20,6 +20,7 @@ if(WIN32) option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON) endif() option(WITH_WEBP "Enable building of oiio with webp support" OFF) +option(WITH_EMBREE "Enable building of Embree" OFF) set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with") if(NOT BUILD_MODE) diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 7bd994c3491..85f59762ef2 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -298,3 +298,7 @@ set(SSL_HASH ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99) set(SQLITE_VERSION 3.24.0) set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip) set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7) + +set(EMBREE_VERSION 3.2.4) +set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip) +set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8) |