Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
395da3d7
by Sean Farrell at 2022-08-21T19:58:35+02:00
1 changed file:
Changes:
... | ... | @@ -61,6 +61,8 @@ |
61 | 61 | #
|
62 | 62 | # Some notes.
|
63 | 63 | #
|
64 | +# - Say `cmake -LAH` to see all configuration options.
|
|
65 | +#
|
|
64 | 66 | # - `cmake' creates configuration files in
|
65 | 67 | #
|
66 | 68 | # <build-directory>/include/freetype/config
|
... | ... | @@ -215,6 +217,8 @@ cmake_dependent_option(FT_REQUIRE_BROTLI |
215 | 217 | "Require support of compressed WOFF2 fonts." OFF
|
216 | 218 | "NOT FT_DISABLE_BROTLI" OFF)
|
217 | 219 | |
220 | +option(FT_ENABLE_ERROR_STRINGS
|
|
221 | + "Enable support for meaningful error descriptions." OFF)
|
|
218 | 222 | |
219 | 223 | # Disallow in-source builds
|
220 | 224 | if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
... | ... | @@ -354,6 +358,12 @@ if (BROTLIDEC_FOUND) |
354 | 358 | FTOPTION_H "${FTOPTION_H}")
|
355 | 359 | endif ()
|
356 | 360 | |
361 | +if (FT_ENABLE_ERROR_STRINGS)
|
|
362 | + string(REGEX REPLACE
|
|
363 | + "/\\* +(#define +FT_CONFIG_OPTION_ERROR_STRINGS) +\\*/" "\\1"
|
|
364 | + FTOPTION_H "${FTOPTION_H}")
|
|
365 | +endif ()
|
|
366 | + |
|
357 | 367 | set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
|
358 | 368 | if (EXISTS "${FTOPTION_H_NAME}")
|
359 | 369 | file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H)
|