summaryrefslogtreecommitdiff
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* Update all copyright notices.Werner Lemberg2023-01-171-1/+1
|
* [meson] Use generated ftmodule.hLoïc Yhuel2022-11-141-1/+4
| | | | | | | | ftmodule.h is generated at the root of the build directory, but FT_CONFIG_MODULES_H (freetype/config/ftmodule.h) is used instead. This makes the build fail when disabling modules in modules.cfg. * meson.build (harfbuzz_dep): Add '-DFT_CONFIG_MODULES_H=<ftmodule.h>'.
* [meson] Disable FreeType in HarfBuzz fallback.Xavier Claessens2022-06-211-1/+2
| | | | | | | | | | | | | | This avoids cyclic subproject configuration when the 'harfbuzz' feature is enabled, or `--wrap-mode=forcefallback` is used, but HarfBuzz is built as a subproject. HarfBuzz does the same and disables HarfBuzz support when configuring FreeType as a subproject. * meson.build (harfbuzz_dep): Implement it. * subprojects/harfbuzz.wrap: New file. * .gitlab-ci.yml [windows meson]: Use latest version of the meson 0.59 series, which has a necessary bug fix to make CI work.
* [meson] Remove `default_library=both` from `default_options`.Xavier Claessens2022-04-241-1/+0
| | | | | | | | | | | | | | It is inconsistent with what all other Meson projects do. It also prevents static linking to FreeType when it is a subproject because `default_options` in a subproject takes precedence on values set on the main project. For example, building 'GStreamer' with `-Ddefault_library=static` would still dynamically link on FreeType unless the user also sets `-Dfreetype2:default_library=static`. * meson.build: Updated. * .gitlab-ci.yml: Retain `both` option for testing.
* Add 'svg' module for OT-SVG rendering.Moazin Khatti2022-01-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * CMakeLists.txt (BASE_SRCS): Add svg module file. * meson.build (ft2_public_headers): Add `otsvg.h`. * modules.cfg (RASTER_MODULES): Add `svg` module. * builds/meson/parse_modules_cfg.py: Add svg module. * include/freetype/config/ftmodule.h: Add `ft_svg_renderer_class`. * include/freetype/fterrdef.h: Add `Invalid_SVG_Document` and `Missing_SVG_Hooks` error codes. * include/freetype/internal/fttrace.h: Add tracing for `otsvg`. * include/freetype/internal/svginterface.h: New file. It adds an interface to enable the presetting hook from the `base` module. * include/freetype/otsvg.h (SVG_Lib_Init_Func, SVG_Lib_Free_Func, SVG_Lib_Render_Func, SVG_Lib_Preset_Slot_Func): New hooks for SVG rendering. (SVG_RendererHooks): New structure to access them. * src/base/ftobjs.c: Include `svginterface.h`. (ft_glyphslot_preset_bitmap): Add code for presetting the slot for SVG glyphs. (ft_add_renderer): Updated. * src/svg/*: New files.
* Update all copyright notices.Werner Lemberg2022-01-111-1/+1
|
* [meson] Change Zlib configuration option.David Turner2022-01-091-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | | * meson_options.txt, meson.build: Change the format of the 'zlib' meson build configuration option to be a combo with the following choices: - none: Do not support gzip-compressed streams at all. - internal: Support gzip-compressed streams using the copy of the gzip sources under `src/gzip/`; this should only be used during development to ensure these work properly. - external: Support gzip-compressed streams using the 'zlib' Meson subproject, linked as a static library. - system: Support gzip-compressed streams using a system-installed version of zlib. - auto: Support gzip-compressed streams using a system-installed version of zlib, if available, or using the 'zlib' subproject otherwise. This is the default. - disabled: Backward-compatible alias for 'none'. - enabled: Backward-compatible alias for 'auto'.
* * meson.build: Optimize lookup for `python3` program.Eli Schwartz2021-12-171-2/+1
| | | | | | | | | | | | | | | | | The python module's `find_installation` method is intended to provide routines for compiling and installing python modules into the `site-packages` directory. It does a couple of slow things, including run an introspection command to scrape sysconfig info from the detected interpreter, which are not needed for the sole use case of invoking the found installation as an executable. Furthermore, when invoked without the name or path of a python binary, it is hardcoded to always look for `python3` corresponding to the interpreter meson itself uses to run. So using `find_installation` did not even allow detecting `python2` as a fallback. Instead, switch to a simple `find_program` lookup that finishes as soon as the program is found.
* * meson.build: Check the return value of `run_command`.Eli Schwartz2021-12-171-6/+12
| | | | | | | | | | | By default, errors are not checked and a command that is somehow broken will just capture incorrect output (likely an empty string). Current development versions of meson now raise a warning for this implicit behavior, and advise explicitly setting the `check:` keyword argumend to determine whether a failing return code should be considered an error. Since none of the commands in this project are expected to fail, mark them as required to succeed.
* meson.build: Initialize `common_ldflags`.Werner Lemberg2021-11-211-2/+4
|
* * meson.build: Fix compatibility version on MacOS.Lukas Oberhuber2021-11-211-0/+15
| | | | Fixes #1117.
* meson.build (gen_docs): Use `current_source_dir` instead of `source_root`.Jan Alexander Steffens (heftig)2021-10-071-1/+1
| | | | | | These two are not equal when FreeType is used as a subproject, such as in `freetype-demos`. In that case, `source_root` points at the root project, causing the docs build to fail.
* * meson.build: Fix zlib support.Werner Lemberg2021-08-021-11/+11
| | | | | | | | | | | This commit synchronizes zlib support with both autotools and cmake: If no external zlib is found (or intentionally disabled on the command line), use the internal zlib by undefining `FT_CONFIG_OPTION_SYSTEM_ZLIB` without modifying `FT_CONFIG_OPTION_USE_ZLIB`. Also improve summary output. Problem reported by Moazin.
* * meson.build: Honor `--includedir` instead of hard-coding 'include'.Heiko Becker2021-07-291-6/+7
| | | | Signed-off-by: Heiko Becker <heirecka@exherbo.org>
* * meson.build: Fix build for other UNIX systems (e.g., FreeBSD).Alex Richardson2021-07-121-1/+3
| | | | | | | | | | | | | | | | | Without this change the build of `unix/ftsystem.c` fails because the `ftconfig.h` header that defines macros such as `HAVE_UNISTD_H` and `HAVE_FCNTL_H` is only being generated for Linux, macOS, and Cygwin systems: ``` .../builds/unix/ftsystem.c:258:32: error: use of undeclared identifier 'O_RDONLY' file = open( filepathname, O_RDONLY ); ``` Instead of hardcoding a list of operating systems for this check, update the logic that decides whether to build the file and set a boolean flag that can be checked instead.
* meson.build: Minor doc fix.Werner Lemberg2021-07-051-2/+3
|
* meson.build: Minor doc improvements.Werner Lemberg2021-07-031-10/+17
|
* [meson] Add first regression test to FreeTypeDavid Turner2021-06-161-0/+3
| | | | | | | | | | | | | | | | | | | * tests/README.md: documentation explaining how to build and run the tests with the Meson build. * tests/scripts/download-test-fonts.sh: Simple script to download test font files to the 'tests/data/' folder. * meson.build, meson_options.txt, tests/meson.build: Add 'tests' option to enable building and running the test programs, disabled by default. * tests/issue-1063/main.c: Simple regression test to exhibit issue 1063. * .gitignore: Ignore the content of the tests/data/ folder for now.
* * meson.build (ft2_public_headers): Add missing `ftcid.h'.Alexei Podtelezhnikov2021-05-231-0/+1
| | | | Fixes #1058.
* meson.build: Minor formatting.Werner Lemberg2021-03-081-7/+21
|
* [meson] Fix 'mmap' handling on Windows.Tim-Philipp Müller2021-03-081-9/+11
| | | | | | | * 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
* [meson] Add subproject fallbacks for 'libpng' and 'zlib'.Tim-Philipp Müller2021-03-071-3/+2
| | | | | | * subprojects/libpng.wrap, subprojects/zlib.wrap: New files. * meson.build: Updated.
* [meson] Make it work with Windows.Xavier Claessens2021-03-071-12/+10
| | | | | | | * meson.build: Do not process `ftconfig.h` when not using `ftconfig.h.in`. Fixes #1029.
* * meson.build: s/freetype2_dep/freetype_dep/.Xavier Claessens2021-02-101-2/+2
| | | | | | | | 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.
* [meson] Fix handling of HarfBuzz library.Xavier Claessens2021-02-101-4/+1
| | | | | | | | | | | | | | | | | * 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.
* Meson: Fix dependency lookup and generate ftconfig.hXavier Claessens2021-02-091-48/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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.
* * meson.build: Fix resource compilation on Windows.Xavier Claessens2021-02-091-3/+6
| | | | | | | | 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.
* * meson.build: s/ft2_libtool_version/ft2_pkgconfig_version/.Xavier Claessens2021-02-091-3/+3
| | | | | | | (freetype2_dep): Use it. `ft2_libtool_version` would be the shared library version, not the one we should use in file `freetype2.pc`.
* * meson.build: Use `meson.override_dependency`.Xavier Claessens2021-02-091-2/+1
| | | | | | | | | | 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.
* * meson.build (bzip2_dep): Simplify.Xavier Claessens2021-02-091-8/+1
| | | | | | | | | | | | 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).
* * meson.build: Set project version.Xavier Claessens2021-02-091-6/+3
|
* * builds/windows/ftsystem.c: Add shared memory support on Windows.Vincent Torri2021-01-271-0/+2
|
* Require HarfBuzz 2.0.0.Werner Lemberg2021-01-231-1/+1
| | | | | | | This is needed to make commit f1f9705f9 work. * CMakeLists.txt (HARFBUZZ_MIN_VERSION), builds/unix/configure.raw (harfbuzz_pkg), meson.build (harfbuzz_dep): Updated.
* Update all copyright notices.Werner Lemberg2021-01-171-1/+1
|
* * meson.build: Add summary.Werner Lemberg2021-01-061-0/+12
| | | | Based on a patch from Vincent Torri <vincent.torri@gmail.com>.
* * meson.build: Fix 'png' build option (#59458).Torsten Hilbrich2021-01-061-2/+4
| | | | Without this patch, 'png' is always required.
* meson.build (ft2_defines): Fix builds on Windows.Ignacio Casal Quinteiro2020-12-231-0/+4
|
* * meson.build: Fix .pc file generation.Werner Lemberg2020-11-041-3/+7
| | | | | | | For backwards compatibility we need the libtool version, not the .so number. Reported by Nikolaus.
* * meson.build: Fix 'harfbuzz' and 'brotli' build options (#59347).Werner Lemberg2020-10-261-4/+8
| | | | | | Without this patch, 'harfbuzz' and 'brotli' are always required. Patch submitted anonymously in Savannah bug report.
* [meson] Move auxiliary scripts to `builds/meson`.Werner Lemberg2020-09-221-8/+8
| | | | | | | | | Suggested by Alexei. * scripts/*.py: Move meson scripts to... * builds/meson/*.py: ... this new location. * meson.build: Updated.
* Add Meson build project file.David Turner2020-09-211-0/+368
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).