summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-11-21 15:10:28 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-11-21 15:10:28 +0200
commite38df6392244d2b4b465222f0f8a0f58893a3e41 (patch)
tree5378fbf17ae5d53b97cf28f1333bc62b83568cbf
parentc58985ed3105ff7fc29fc0d53ba81ba55882e05e (diff)
Depends: Logic for building HarfBuzz/FriBidi
IssueID #390
-rw-r--r--Depends.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/Depends.cmake b/Depends.cmake
index c3decd7a..aaa2e8ea 100644
--- a/Depends.cmake
+++ b/Depends.cmake
@@ -43,12 +43,13 @@ else ()
43 endif () 43 endif ()
44endif () 44endif ()
45 45
46if (ENABLE_HARFBUZZ AND EXISTS ${CMAKE_SOURCE_DIR}/lib/harfbuzz/CMakeLists.txt) 46if (ENABLE_HARFBUZZ)
47 # Find HarfBuzz with pkg-config. 47 # Find HarfBuzz with pkg-config.
48 if (NOT ENABLE_HARFBUZZ_MINIMAL AND PKG_CONFIG_FOUND) 48 if (NOT ENABLE_HARFBUZZ_MINIMAL AND PKG_CONFIG_FOUND)
49 pkg_check_modules (HARFBUZZ IMPORTED_TARGET harfbuzz) 49 pkg_check_modules (HARFBUZZ IMPORTED_TARGET harfbuzz)
50 endif () 50 endif ()
51 if (ENABLE_HARFBUZZ_MINIMAL OR NOT HARFBUZZ_FOUND) 51 if (EXISTS ${CMAKE_SOURCE_DIR}/lib/harfbuzz/CMakeLists.txt AND
52 (ENABLE_HARFBUZZ_MINIMAL OR NOT HARFBUZZ_FOUND))
52 # Build HarfBuzz with minimal dependencies. 53 # Build HarfBuzz with minimal dependencies.
53 if (MESON_EXECUTABLE AND NINJA_EXECUTABLE) 54 if (MESON_EXECUTABLE AND NINJA_EXECUTABLE)
54 set (_dst ${CMAKE_BINARY_DIR}/lib/harfbuzz) 55 set (_dst ${CMAKE_BINARY_DIR}/lib/harfbuzz)
@@ -107,12 +108,12 @@ if (ENABLE_HARFBUZZ AND EXISTS ${CMAKE_SOURCE_DIR}/lib/harfbuzz/CMakeLists.txt)
107 endif () 108 endif ()
108endif () 109endif ()
109 110
110if (ENABLE_FRIBIDI AND EXISTS ${CMAKE_SOURCE_DIR}/lib/fribidi) 111if (ENABLE_FRIBIDI)
111 # Find FriBidi with pkg-config. 112 # Find FriBidi with pkg-config.
112 if (NOT ENABLE_FRIBIDI_BUILD AND PKG_CONFIG_FOUND) 113 if (NOT ENABLE_FRIBIDI_BUILD AND PKG_CONFIG_FOUND)
113 pkg_check_modules (FRIBIDI IMPORTED_TARGET fribidi) 114 pkg_check_modules (FRIBIDI IMPORTED_TARGET fribidi)
114 endif () 115 endif ()
115 if (ENABLE_FRIBIDI_BUILD OR NOT FRIBIDI_FOUND) 116 if (EXISTS ${CMAKE_SOURCE_DIR}/lib/fribidi AND (ENABLE_FRIBIDI_BUILD OR NOT FRIBIDI_FOUND))
116 # Build FriBidi with Meson. 117 # Build FriBidi with Meson.
117 set (_dst ${CMAKE_BINARY_DIR}/lib/fribidi) 118 set (_dst ${CMAKE_BINARY_DIR}/lib/fribidi)
118 if (MESON_EXECUTABLE AND NINJA_EXECUTABLE) 119 if (MESON_EXECUTABLE AND NINJA_EXECUTABLE)