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 <campbell@blender.org>2022-01-26 07:30:21 +0300
committerCampbell Barton <campbell@blender.org>2022-01-26 07:31:30 +0300
commit4c951bfa829ed123b57c33e7821569f283658fd9 (patch)
tree019ff5b1d9d40960b92632832b94c73d42205fc0 /build_files
parent45304493176e7160917081561bd209ed10527443 (diff)
CMake: add WITH_SYSTEM_FREETYPE to link against the systems freetype
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_unix.cmake16
1 files changed, 12 insertions, 4 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index a3b8b17ec19..c5a9017f025 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -104,10 +104,12 @@ find_package_wrapper(PNG REQUIRED)
find_package_wrapper(ZLIB REQUIRED)
find_package_wrapper(Zstd REQUIRED)
-# FreeType compiled with Brotli compression for woff2.
-find_package_wrapper(Freetype REQUIRED)
-if(EXISTS ${LIBDIR})
- find_package_wrapper(Brotli REQUIRED)
+if(NOT WITH_SYSTEM_FREETYPE)
+ # FreeType compiled with Brotli compression for woff2.
+ find_package_wrapper(Freetype REQUIRED)
+ if(EXISTS ${LIBDIR})
+ find_package_wrapper(Brotli REQUIRED)
+ endif()
endif()
if(WITH_PYTHON)
@@ -552,6 +554,12 @@ if(EXISTS ${LIBDIR})
set(WITH_STATIC_LIBS ${WITH_STATIC_LIBS_INIT})
endif()
+if(WITH_SYSTEM_FREETYPE)
+ find_package_wrapper(Freetype)
+ if(NOT FREETYPE_FOUND)
+ message(FATAL_ERROR "Failed finding system FreeType version!")
+ endif()
+endif()
if(WITH_LZO AND WITH_SYSTEM_LZO)
find_package_wrapper(LZO)