diff options
author | Sean Farrell <sean.farrell@rioki.org> | 2022-08-19 16:08:26 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2022-08-21 19:58:35 +0200 |
commit | 395da3d72ac5186fdf68fb450bba1d57515fce1e (patch) | |
tree | bb311361a281275ab4d6cf32e0372185e0d8e10e /CMakeLists.txt | |
parent | 37b718d5899bc4a85425fcc548a7636871808f96 (diff) | |
download | freetype2-395da3d72ac5186fdf68fb450bba1d57515fce1e.tar.gz |
CMakeLists.txt (FT_ENABLE_ERROR_STRINGS): New configuration option.
This option uncomments FreeType configuration macro
`FT_CONFIG_OPTION_ERROR_STRINGS` to make function `FT_Error_String` return
meaningful error strings.
This option is off by default.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index feb4be39a..dff5b4ef5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,8 @@ # # Some notes. # +# - Say `cmake -LAH` to see all configuration options. +# # - `cmake' creates configuration files in # # <build-directory>/include/freetype/config @@ -215,6 +217,8 @@ cmake_dependent_option(FT_REQUIRE_BROTLI "Require support of compressed WOFF2 fonts." OFF "NOT FT_DISABLE_BROTLI" OFF) +option(FT_ENABLE_ERROR_STRINGS + "Enable support for meaningful error descriptions." OFF) # Disallow in-source builds if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") @@ -354,6 +358,12 @@ if (BROTLIDEC_FOUND) FTOPTION_H "${FTOPTION_H}") endif () +if (FT_ENABLE_ERROR_STRINGS) + string(REGEX REPLACE + "/\\* +(#define +FT_CONFIG_OPTION_ERROR_STRINGS) +\\*/" "\\1" + FTOPTION_H "${FTOPTION_H}") +endif () + set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h") if (EXISTS "${FTOPTION_H_NAME}") file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H) |