freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] CMakeLists.txt (FT_ENABLE_ERROR_STRINGS


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] CMakeLists.txt (FT_ENABLE_ERROR_STRINGS): New configuration option.
Date: Sun, 21 Aug 2022 18:00:54 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

  • 395da3d7
    by Sean Farrell at 2022-08-21T19:58:35+02:00
    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.
    

1 changed file:

Changes:

  • CMakeLists.txt
    ... ... @@ -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)
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]