meson.build


Log

Author Commit Date CI Message
Alexei Podtelezhnikov 16947c0e 2021-05-23T05:36:16 * meson.build (ft2_public_headers): Add missing `ftcid.h'. Fixes #1058.
Werner Lemberg fedd945c 2021-03-08T10:30:57 meson.build: Minor formatting.
Tim-Philipp Müller 7252e35e 2021-03-07T18:13:59 [meson] Fix 'mmap' handling on Windows. * meson.build (ft2_sources): Always use `windows/ftsystem.c` on Windows unless mmap has been disabled. https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/5#note_829289
Tim-Philipp Müller bb42afbd 2021-01-17T15:50:08 [meson] Add subproject fallbacks for 'libpng' and 'zlib'. * subprojects/libpng.wrap, subprojects/zlib.wrap: New files. * meson.build: Updated.
Xavier Claessens d69d9c23 2021-02-13T16:32:26 [meson] Make it work with Windows. * meson.build: Do not process `ftconfig.h` when not using `ftconfig.h.in`. Fixes #1029.
Xavier Claessens cc90307d 2021-02-10T09:30:40 * meson.build: s/freetype2_dep/freetype_dep/. Many projects (e.g., fontconfig, cairo) hardcode the `freetype_dep` variable name to use FreeType as subproject because that was the variable name in Centricular's Meson port of FreeType. While they should stop hardcoding that variable name, it does not cost us anything to keep using that name to ease transition.
Xavier Claessens 3dbdb78a 2021-02-10T09:25:42 [meson] Fix handling of HarfBuzz library. * meson.build (harfbuzz_dep): Do not fall back to HarfBuzz by default. Otherwise it causes a dependency cycle: cairo => fontconfig => freetype2 => harfbuzz => cairo Meson will still fall back to HarfBuzz subprojects if the `harfbuzz` option is set to `enabled` instead of `auto` and a `subprojects/harfbuzz.wrap` file is present. In that case it is the responsibility of the main project to set the proper options on each subproject to break the dependency cycle. Fixes: #1028.
Xavier Claessens 2c405596 2020-10-26T14:56:05 Meson: Fix dependency lookup and generate ftconfig.h [meson] Fix dependency lookup and generate `ftconfig.h`. - zlib: If not found on the system, meson can build it as a subproject. We thus never use the (outdated) zlib support that comes with FreeType. Doing so has the additional advantage that the zlib code can be shared with other projects like GLib if both are subprojects of an application. - harfbuzz: Build as a subproject if not found on the system. - 'QUESTION: What if the compiler doesn't support `-D` but uses `/D` instead as on Windows?' Answer: Meson translate arguments for us. - visibility: Replace self-made code with meson-specific solution. * meson.build (ft2_defines): Rewrite logic to set and handle it. (process_header_command): New variable, previously called `ftoption_command`. (ftoption_command, ftconfig_command): New variables. (zlib_option): Removed. (zlib_dep): New variable. (ft2_deps): Updated. (harfbuzz_dep): Updated. (ftconfig_h_in, ftconfig_h): New variables. (ft2_sources): Updated. (ft2_lib): Updated, handle visibility. (summary): Updted. * meson_options.txt (zlib): Updated.
Xavier Claessens e11cc40a 2020-10-26T14:21:19 * meson.build: Fix resource compilation on Windows. This is copied from GStreamer's meson port of FreeType. (ft2_sources): Add both debug and resource file (the latter for Windows only). (ft2_debug_src): Removed.
Xavier Claessens 69e0faa8 2020-10-26T13:39:19 * meson.build: s/ft2_libtool_version/ft2_pkgconfig_version/. (freetype2_dep): Use it. `ft2_libtool_version` would be the shared library version, not the one we should use in file `freetype2.pc`.
Xavier Claessens 0565c5ba 2020-10-26T11:31:19 * meson.build: Use `meson.override_dependency`. This is a new meson mechanism to avoid other projects to hard-code the `freetype2_dep` variable name in their build definition. It also ensures that meson does not mix system and subproject versions of FreeType inside of the same project. Also remove outdated TODO because `declare_dependency` was already there.
Xavier Claessens 5c81e09b 2020-10-26T11:26:04 * meson.build (bzip2_dep): Simplify. We remove `static:false` from `find_library('bz2')`. I don't know whether the previous code was a workaround for an old meson bug, but at least with version >=0.55.0 (which FreeType uses) it picks the shared library when both are available. With this commit, file `freetype2.pc` no longer contains the full path to file `libbz2.so`; instead, it correctly uses `-lbz2`. Note that this is a meson bug is still present in the current version (0.57.0).
Xavier Claessens 1b69fb9b 2020-10-26T11:25:08 * meson.build: Set project version.
Vincent Torri bb33f03a 2021-01-27T06:43:41 * builds/windows/ftsystem.c: Add shared memory support on Windows.
Werner Lemberg 209e9841 2021-01-23T14:15:29 Require HarfBuzz 2.0.0. This is needed to make commit f1f9705f9 work. * CMakeLists.txt (HARFBUZZ_MIN_VERSION), builds/unix/configure.raw (harfbuzz_pkg), meson.build (harfbuzz_dep): Updated.
Werner Lemberg b6e8a712 2021-01-17T07:18:48 Update all copyright notices.
Werner Lemberg f88c00e4 2021-01-06T19:19:29 * meson.build: Add summary. Based on a patch from Vincent Torri <vincent.torri@gmail.com>.
Torsten Hilbrich c6345ca3 2021-01-06T08:55:16 * meson.build: Fix 'png' build option (#59458). Without this patch, 'png' is always required.
Ignacio Casal Quinteiro 768022b9 2020-12-23T11:30:19 meson.build (ft2_defines): Fix builds on Windows.
Werner Lemberg 26e2a895 2020-11-04T21:00:22 * meson.build: Fix .pc file generation. For backwards compatibility we need the libtool version, not the .so number. Reported by Nikolaus.
Werner Lemberg 40c5681a 2020-10-26T18:09:56 * meson.build: Fix 'harfbuzz' and 'brotli' build options (#59347). Without this patch, 'harfbuzz' and 'brotli' are always required. Patch submitted anonymously in Savannah bug report.
Werner Lemberg 3ce0df52 2020-09-22T20:05:37 [meson] Move auxiliary scripts to `builds/meson`. Suggested by Alexei. * scripts/*.py: Move meson scripts to... * builds/meson/*.py: ... this new location. * meson.build: Updated.
David Turner 66978a58 2020-05-17T18:45:41 Add Meson build project file. Example usage: # Configure Meson build in directory `build-meson` to generate # release binaries comparable to to the ones from the # autotools/make build system. meson setup build-meson \ --prefix=/usr/local \ --buildtype=debugoptimized \ --strip \ -Db_ndebug=true # After configuring the Meson build with the above command, # compile and install to `/usr/local/`; this includes a pkg-config # file. ninja -C build-meson install # Alternatively, compile and install to `/tmp/aa/usr/local/...` # for packaging. DESTDIR=/tmp/aa ninja -C build-meson install # Generate documentation under `build-meson/docs`. ninja -C build-meson docs Library size comparison for stripped `libfreetype.so` generated by all three build systems: - Default build (autotools + libtool): 712 KiB - CMake build (RelWithDebInfo): 712 KiB - Meson build: 712 KiB * meson.build: New top-level Meson build file for the library. * meson_options.txt: New file. It holds user-selectable options for the build, which can be printed with `meson configure`, and selected at `meson setup` or `meson --reconfigure` time with `-D<option>=<value>`. * scripts/parse_modules_cfg.py: A script invoked by `meson.build` to parse `modules.cfg` and extract important information out of it (i.e., the list of modules). * scripts/process_ftoption_h.py: New script invoked by `meson.build` to process the original `ftoption.h` file. It enables or disables configuration macro variables based on the available dependencies. This is similar to what other build systems are using (i.e., Meson's `configure_file()` command is not used here). * scripts/extract_freetype_version.py: New script invoked by `meson.build` to extract the FreeType version number from `<freetype/freetype.h>`. * scripts/extract_libtool_version.py: New script invoked by `meson.build` to extract the libtool `revision_info` data from `builds/unix/configure.raw`, and to generate the corresponding shared library suffix. * scripts/generate_reference_docs.py: New script invoked by `meson.build` to generate the FreeType 2 reference documentation (using the `docwriter` and `mkdocs` packages, which must be already installed).