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:
authorHoward Trickey <howard.trickey@gmail.com>2021-10-24 15:31:22 +0300
committerHoward Trickey <howard.trickey@gmail.com>2021-10-24 15:31:22 +0300
commit1aa953bd1913c81b22c80a00edbf4ad88a32c52f (patch)
tree7fa65e43d5a9bac6496555b723f37e0031e2737e /source/blender/blendthumb/CMakeLists.txt
parentfc171c1be9da36485e892339b86dc8d4251914af (diff)
parent6ce383a9dfba5c49a48676c3a651804fde3dfe34 (diff)
Merge branch 'master' into soc-2020-io-performance
Diffstat (limited to 'source/blender/blendthumb/CMakeLists.txt')
-rw-r--r--source/blender/blendthumb/CMakeLists.txt64
1 files changed, 50 insertions, 14 deletions
diff --git a/source/blender/blendthumb/CMakeLists.txt b/source/blender/blendthumb/CMakeLists.txt
index b42ca284ecb..4bcd27082c0 100644
--- a/source/blender/blendthumb/CMakeLists.txt
+++ b/source/blender/blendthumb/CMakeLists.txt
@@ -19,23 +19,59 @@
# ***** END GPL LICENSE BLOCK *****
#-----------------------------------------------------------------------------
-include_directories(${ZLIB_INCLUDE_DIRS})
+# Shared Thumbnail Extraction Logic
+
+include_directories(
+ ../blenlib
+ ../makesdna
+ ../../../intern/guardedalloc
+)
+
+include_directories(
+ SYSTEM
+ ${ZLIB_INCLUDE_DIRS}
+)
set(SRC
- src/BlenderThumb.cpp
- src/BlendThumb.def
- src/BlendThumb.rc
- src/Dll.cpp
+ src/blendthumb.hh
+ src/blendthumb_extract.cc
+ src/blendthumb_png.cc
)
-string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /nodefaultlib:MSVCRT.lib")
+if(WIN32)
+ # -----------------------------------------------------------------------------
+ # Build `BlendThumb.dll`
-add_library(BlendThumb SHARED ${SRC})
-setup_platform_linker_flags(BlendThumb)
-target_link_libraries(BlendThumb ${ZLIB_LIBRARIES})
+ set(SRC_WIN32
+ src/blendthumb_win32.cc
+ src/blendthumb_win32.def
+ src/blendthumb_win32.rc
+ src/blendthumb_win32_dll.cc
+ )
-install(
- FILES $<TARGET_FILE:BlendThumb>
- COMPONENT Blender
- DESTINATION "."
-)
+ add_definitions(-DNOMINMAX)
+
+ add_library(BlendThumb SHARED ${SRC} ${SRC_WIN32})
+
+ target_link_libraries(BlendThumb bf_blenlib dbghelp.lib Version.lib)
+ set_target_properties(BlendThumb PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:msvcrt")
+
+ install(
+ FILES $<TARGET_FILE:BlendThumb>
+ COMPONENT Blender
+ DESTINATION "."
+ )
+else()
+ # -----------------------------------------------------------------------------
+ # Build `blender-thumbnailer` executable
+
+ add_executable(blender-thumbnailer ${SRC} src/blender_thumbnailer.cc)
+ target_link_libraries(blender-thumbnailer bf_blenlib)
+ target_link_libraries(blender-thumbnailer ${PTHREADS_LIBRARIES})
+
+ install(
+ FILES $<TARGET_FILE:blender-thumbnailer>
+ COMPONENT Blender
+ DESTINATION "."
+ )
+endif()