Home Explore Blog CI



neovim

2nd chunk of `cmake.deps/cmake/GettextCMakeLists.txt`
b2c6c9f91d703c78c586af5e416f58662b17f4cc2d0307200000000100000fa9
 IN_LIBINTL
  ENABLE_RELOCATABLE=1
  IN_LIBRARY
  NO_XMALLOC
  set_relocation_prefix=libintl_set_relocation_prefix
  relocate=libintl_relocate
  HAVE_CONFIG_H)


file(READ gettext-tools/config.h.in CONFIG_CONTENT)
string(REPLACE "#undef FLEXIBLE_ARRAY_MEMBER" "#define FLEXIBLE_ARRAY_MEMBER 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "__declspec (dllimport)" "" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef ENDIANNESS" "#define ENDIANNESS 0" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef GNULIB_FWRITEERROR" "#define GNULIB_FWRITEERROR 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_DECL_STRERROR_R" "#define HAVE_DECL_STRERROR_R 0" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_DUP2" "#define HAVE_DUP2 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_ICONV_H" "#define HAVE_ICONV_H 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_ICONV" "#define HAVE_ICONV 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_LIBUNISTRING" "#define HAVE_LIBUNISTRING 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_STDINT_H_WITH_UINTMAX" "#define HAVE_STDINT_H_WITH_UINTMAX 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_STDINT_H" "#define HAVE_STDINT_H 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_LONG_LONG_INT" "#define HAVE_LONG_LONG_INT 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_STRING_H" "#define HAVE_STRING_H 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_SYS_TIMEB_H" "#define HAVE_SYS_TIMEB_H 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE__FTIME" "#define HAVE__FTIME 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_FLOAT_H" "#define HAVE_FLOAT_H 1" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef ICONV_CONST" "#define ICONV_CONST const" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef PACKAGE" "#define PACKAGE \"gettext\"\n#define gettext_VERSION" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef VERSION" "#define VERSION \"\"" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef mode_t" "#define mode_t int" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef pid_t" "#define pid_t int" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef restrict" "#define restrict __restrict" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef ssize_t" "#include <BaseTsd.h>\n#define ssize_t SSIZE_T" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef uid_t" "#define uid_t int" CONFIG_CONTENT ${CONFIG_CONTENT})
string(REPLACE "#undef HAVE_DECL___ARGV" "#define HAVE_DECL___ARGV 1" CONFIG_CONTENT ${CONFIG_CONTENT})
set(CONFIG_CONTENT "${CONFIG_CONTENT}\n#define isatty libtextstyle_isatty")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gettext-tools/config.h ${CONFIG_CONTENT})

set(libgettextsrc_COMMON_SOURCE
  message.c po-error.c po-xerror.c read-catalog-abstract.c po-lex.c
  po-gram-gen.c po-charset.c read-po.c read-properties.c read-stringtable.c
  open-catalog.c dir-list.c str-list.c)

set(libgettextsrc_FORMAT_SOURCE
  format.c format-invalid.h format-c.c format-c-parse.h format-sh.c
  format-python.c format-python-brace.c format-lisp.c format-elisp.c
  format-librep.c format-scheme.c format-java.c format-csharp.c format-awk.c
  format-pascal.c format-ycp.c format-tcl.c format-perl.c format-perl-brace.c
  format-php.c format-gcc-internal.c format-gfc-internal.c format-qt.c
  format-qt-plural.c format-kde.c format-kde-kuit.c format-boost.c format-lua.c
  format-javascript.c)

set(libgettextsrc_SOURCES
  ${libgettextsrc_COMMON_SOURCE} read-catalog.c
  write-catalog.c write-properties.c write-stringtable.c write-po.c
  msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c
  msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c
  plural-table.c quote.h sentence.h sentence.c
  ${libgettextsrc_FORMAT_SOURCE}
  read-desktop.c locating-rule.c its.c search-path.c)

Title: Configuration of Gettext Tools and Source Files
Summary
This section continues the CMake configuration, focusing on the gettext tools. It modifies the `config.h.in` file for the tools, defining various macros and settings. It then defines source file lists for the `libgettextsrc` library, including common sources, format-specific sources, and other files related to catalog reading, writing, message handling, and pluralization.