Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/build_environment/cmake')
-rw-r--r--build_files/build_environment/cmake/blendthumb.cmake67
-rw-r--r--build_files/build_environment/cmake/check_software.cmake53
-rw-r--r--build_files/build_environment/cmake/harvest.cmake3
3 files changed, 53 insertions, 70 deletions
diff --git a/build_files/build_environment/cmake/blendthumb.cmake b/build_files/build_environment/cmake/blendthumb.cmake
deleted file mode 100644
index f4cc6ee9d37..00000000000
--- a/build_files/build_environment/cmake/blendthumb.cmake
+++ /dev/null
@@ -1,67 +0,0 @@
-# ***** 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 *****
-
-if(BUILD_MODE STREQUAL Release)
- if(WIN32)
- set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
-
- ExternalProject_Add(external_zlib_32
- URL ${ZLIB_URI}
- CMAKE_GENERATOR ${GENERATOR_32}
- URL_HASH MD5=${ZLIB_HASH}
- DOWNLOAD_DIR ${DOWNLOAD_DIR}
- PREFIX ${BUILD_DIR}/zlib32
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
- INSTALL_DIR ${LIBDIR}/zlib32
- )
-
- ExternalProject_Add(external_zlib_64
- URL ${ZLIB_URI}
- CMAKE_GENERATOR ${GENERATOR_64}
- URL_HASH MD5=${ZLIB_HASH}
- DOWNLOAD_DIR ${DOWNLOAD_DIR}
- PREFIX ${BUILD_DIR}/zlib64
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
- INSTALL_DIR ${LIBDIR}/zlib64
- )
-
- ExternalProject_Add(external_blendthumb_32
- CMAKE_GENERATOR ${GENERATOR_32}
- SOURCE_DIR ${THUMB_DIR}
- PREFIX ${BUILD_DIR}/blendthumb32
- 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
- )
-
- ExternalProject_Add(external_blendthumb_64
- CMAKE_GENERATOR ${GENERATOR_64}
- SOURCE_DIR ${THUMB_DIR}
- PREFIX ${BUILD_DIR}/blendthumb64
- 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
- )
- endif()
-endif()
diff --git a/build_files/build_environment/cmake/check_software.cmake b/build_files/build_environment/cmake/check_software.cmake
new file mode 100644
index 00000000000..30dea754e20
--- /dev/null
+++ b/build_files/build_environment/cmake/check_software.cmake
@@ -0,0 +1,53 @@
+# ***** 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 *****
+
+if(UNIX)
+ set(_required_software
+ autoconf
+ automake
+ libtoolize
+ nasm
+ yasm
+ tclsh
+ )
+
+ foreach(_software ${_required_software})
+ find_program(_software_find NAMES ${_software})
+ if(NOT _software_find)
+ set(_software_missing "${_software_missing}${_software} ")
+ endif()
+ unset(_software_find CACHE)
+ endforeach()
+
+ if(_software_missing)
+ message(
+ "\n"
+ "Missing software for building Blender dependencies:\n"
+ " ${_software_missing}\n"
+ "\n"
+ "On Debian and Ubuntu:\n"
+ " apt install autoconf automake libtool yasm nasm tcl\n"
+ "\n"
+ "On macOS (with homebrew):\n"
+ " brew install cmake autoconf automake libtool yasm nasm\n"
+ "\n"
+ "Other platforms:\n"
+ " Install equivalent packages.\n")
+ message(FATAL_ERROR "Install missing software before continuing")
+ endif()
+endif()
diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake
index 97e4a6b69d4..526e72e2e33 100644
--- a/build_files/build_environment/cmake/harvest.cmake
+++ b/build_files/build_environment/cmake/harvest.cmake
@@ -51,9 +51,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/ &&
- # 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 &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy