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:
authorCampbell Barton <ideasman42@gmail.com>2021-10-20 04:10:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-20 04:15:33 +0300
commitfd7510984a6d472969436721031ae309ec4981a0 (patch)
treef8eebf3651bccfb8ad605c818496056e8ece1bd0
parentb280699078eee23bd8eb572668d6f0d8972d879a (diff)
CMake: add WITH_BLENDER_THUMBNAILER option
Make building the thumbnail extraction executable optional, disable on macOS as this was not linking, further, macOS doesn't use this for thumbnail extraction so it could be left disabled.
-rw-r--r--CMakeLists.txt10
-rw-r--r--build_files/cmake/config/blender_lite.cmake1
-rw-r--r--source/blender/CMakeLists.txt5
-rw-r--r--source/creator/CMakeLists.txt20
4 files changed, 27 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16842f3134b..544e22f342b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,6 +156,16 @@ get_blender_version()
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
mark_as_advanced(WITH_BLENDER)
+if(APPLE)
+ # Currently this causes a build error linking, disable.
+ set(WITH_BLENDER_THUMBNAILER OFF)
+elseif(WIN32)
+ # Building the thumbnail extraction DLL could be made optional.
+ set(WITH_BLENDER_THUMBNAILER ON)
+else()
+ option(WITH_BLENDER_THUMBNAILER "Build \"blender-thumbnailer\" thumbnail extraction utility" ON)
+endif()
+
option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake
index 0cd886e67d7..89bd46ecd7d 100644
--- a/build_files/cmake/config/blender_lite.cmake
+++ b/build_files/cmake/config/blender_lite.cmake
@@ -9,6 +9,7 @@ set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
+set(WITH_BLENDER_THUMBNAILER OFF CACHE BOOL "" FORCE)
set(WITH_BOOST OFF CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index 0a494677d96..c6112344208 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -131,7 +131,10 @@ add_subdirectory(io)
add_subdirectory(functions)
add_subdirectory(makesdna)
add_subdirectory(makesrna)
-add_subdirectory(blendthumb)
+
+if(WITH_BLENDER_THUMBNAILER)
+ add_subdirectory(blendthumb)
+endif()
if(WITH_COMPOSITOR)
add_subdirectory(compositor)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 45bfc3d6bdb..1d5d1491c7a 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -515,10 +515,12 @@ if(UNIX AND NOT APPLE)
DESTINATION "."
)
- install(
- TARGETS blender-thumbnailer
- DESTINATION "."
- )
+ if(WITH_BLENDER_THUMBNAILER)
+ install(
+ TARGETS blender-thumbnailer
+ DESTINATION "."
+ )
+ endif()
if(EXISTS ${LIBDIR}/mesa)
install(DIRECTORY ${LIBDIR}/mesa/lib DESTINATION ".")
@@ -558,10 +560,12 @@ if(UNIX AND NOT APPLE)
FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/symbolic/apps/blender-symbolic.svg
DESTINATION share/icons/hicolor/symbolic/apps
)
- install(
- TARGETS blender-thumbnailer
- DESTINATION bin
- )
+ if(WITH_BLENDER_THUMBNAILER)
+ install(
+ TARGETS blender-thumbnailer
+ DESTINATION bin
+ )
+ endif()
set(BLENDER_TEXT_FILES_DESTINATION share/doc/blender)
endif()