summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-06-26 07:02:46 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-06-26 07:02:46 +0300
commit512702de740c3c6b38097d101f1f454d7da22e97 (patch)
treef0562a6872131fcc271d4838d3761a67408d62e7 /CMakeLists.txt
parent5dbc85eaaa1bd0a0fc11dd76a75ece2efe763df5 (diff)
Text: Link with HarfBuzz; old run_Font_ is a fallback
HarfBuzz will provide proper Unicode text shaping for both simple and complex scripts. The old `run_Font_` is available for use as a fallback if HarfBuzz is not available due to size or complexity constraints (it's written in C++).
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 47cd2442..e6baba76 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,7 @@ if (IOS)
29endif () 29endif ()
30 30
31# Build configuration. 31# Build configuration.
32option (ENABLE_HARFBUZZ "Use HarfBuzz to shape text" ON)
32option (ENABLE_IPC "Use IPC to communicate between running instances" ON) 33option (ENABLE_IPC "Use IPC to communicate between running instances" ON)
33option (ENABLE_MPG123 "Use mpg123 for decoding MPEG audio" ON) 34option (ENABLE_MPG123 "Use mpg123 for decoding MPEG audio" ON)
34option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF) 35option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF)
@@ -308,6 +309,10 @@ if (ENABLE_CUSTOM_FRAME AND MSYS)
308endif () 309endif ()
309target_link_libraries (app PUBLIC the_Foundation::the_Foundation) 310target_link_libraries (app PUBLIC the_Foundation::the_Foundation)
310target_link_libraries (app PUBLIC ${SDL2_LDFLAGS}) 311target_link_libraries (app PUBLIC ${SDL2_LDFLAGS})
312if (ENABLE_HARFBUZZ AND HARFBUZZ_FOUND)
313 target_link_libraries (app PUBLIC harfbuzz)
314 target_compile_definitions (app PUBLIC LAGRANGE_ENABLE_HARFBUZZ=1)
315endif ()
311if (APPLE) 316if (APPLE)
312 if (IOS) 317 if (IOS)
313 target_link_libraries (app PUBLIC "-framework UIKit") 318 target_link_libraries (app PUBLIC "-framework UIKit")