Commit Graph

59 Commits

Author SHA1 Message Date
Ebrahim Byagowi
d54de56870 [style] Adopt with meson 2020-06-04 20:33:39 +04:30
Ebrahim Byagowi
d67553d12f
[meson] fix with_libstdcxx effect
oops
2020-06-04 12:31:57 +04:30
Ebrahim Byagowi
029ecf326e [meson] Fix gen-hb-version.py run
It gets complicated apparently when executed in the dist process, let's use raw
names now that we are operating in the script folder anyway.
2020-06-04 03:35:28 +04:30
Ebrahim Byagowi
870304df76 [meson] Remove amalgam build option
Fixes #2444
2020-06-04 03:26:19 +04:30
Ebrahim Byagowi
b8320340ce
[meson] fix gen script input
matters more when harfbuzz is a subproject
2020-06-03 23:40:57 +04:30
Ebrahim Byagowi
a9d13463b5 [meson] Categorize tests using suite: [...]
So one can run a category of interested tests like

  meson test -Cbuild --suite aots --suite src --print-errorlogs

Intead issuing particular tests which also is possible like

  meson test -Cbuild test-shape --print-errorlogs
2020-05-30 16:58:46 +04:30
Ebrahim Byagowi
7250adee26 [tests] Port check scripts to python 2020-05-30 13:55:47 +04:30
Ebrahim Byagowi
e3af529e51 [meson] update generated headers only when the result is different
This way it won't ruin incremental builds.

We need a better way to declare source altering tasks
https://github.com/mesonbuild/meson/issues/7156
yet this is good enough despite being not idiomatic.

It is however not that smooth yet as the change may is detected on the
next meson run. One of course can issue ./gen-ragel-artifacts.py
manually for better experience before running meson.
2020-05-23 22:35:43 +04:30
Ebrahim Byagowi
887aa0214f [meson] Use find_program for locating python script
Apparently that is the simplest and supported way of finding python scripts.
2020-05-21 20:03:11 +04:30
Ebrahim Byagowi
d9177a594b [meson] Use a c linker for on Windows also
Using a C linker was limited to non-Windows as 20a840c7, let's
revisit this while transition to meson.

Packagers easily override that via the option and use a C++ linker
if needed.
2020-05-21 19:37:57 +04:30
Ebrahim Byagowi
cc53fd158c
[meson] Normalize options names
As https://github.com/harfbuzz/harfbuzz/pull/2412#discussion_r426275027
2020-05-21 19:33:18 +04:30
Ebrahim Byagowi
a9e8328ae2 [meson] Add build configuration summary just like autotools 2020-05-21 19:29:32 +04:30
Ebrahim Byagowi
f7562672f9 [meson] Use / instead join_paths
We need some of the very recent features of meson, let's use the new features also
2020-05-21 18:52:31 +04:30
Ebrahim Byagowi
4fc6189a32 [meson] Generate harfbuzz.cc, hb-version.h and ragel artifacts 2020-05-18 13:54:42 +04:30
Christoph Reiter
b19f927f96 meson: error out if introspection is enabled but gobject isn't
In case a user passed -Dintrospection=enabled the build would just ignore
it by default because gobject defaults to disabled and the introspection build
gets skipped.

Instead, if introspection is explicitly enabled but gobject is for some reason
missing error out.

Fixes #2404
2020-05-17 11:10:08 +04:30
Ebrahim Byagowi
bb095e1bdd [meson] make -subset target dependent to deps to get libm dependency 2020-05-10 22:00:05 +04:30
Ebrahim Byagowi
eea99d7b72 [meson] Let name_prefix of exported libraries the default
meson complains about this and it is the default per #2256

Fixes #2256
2020-05-10 14:46:19 +04:30
Ebrahim Byagowi
2ac4222022 [meson] specify preferred linker to avoid stdc++ linking 2020-05-10 14:35:20 +04:30
Ebrahim Byagowi
15083c24ee [meson] Reenable make check-symbols compatible with gcov 2020-05-10 14:35:20 +04:30
Ebrahim Byagowi
6890554256
[ci/meson] temporarily disable check-symbols
will enable again
2020-04-28 14:56:47 +04:30
Hugo Beauzée-Luyssen
6881939f77 src: meson: Reindent after last changes 2020-04-23 13:27:12 +04:30
Hugo Beauzée-Luyssen
e18858c685 src: Don't build tests when they are disabled 2020-04-23 13:27:12 +04:30
Ebrahim Byagowi
750bb73e32 [meson] Add an experimental-api option 2020-04-21 01:26:08 +04:30
Christoph Reiter
fb3acdbcb6 meson: only install gobject/icu headers if the features are enabled 2020-04-19 18:49:43 +04:30
Christoph Reiter
ad5dcda0b5 meson: install hb-icu.h header 2020-04-19 18:49:43 +04:30
Ebrahim Byagowi
c6b3f73b09 [meson] Make harfbuzz-icu separate module optout-able 2020-04-19 02:06:01 +04:30
Christoph Reiter
8ae06c9489 meson: build a separate library for harfbuzz-icu
This adds a seperate library like with autotools.

This also fixes the ico feature option which was just set to required:false
when disabled instead of really disabling it.
Disabling is still broken with msvc because it then tries to find the library
another way, but that's broken for all other deps as well so I left it as is.

For tests only test-unicode.c is using icu specific functions so split it out
into its own category which depends on harfbuzz-icu.

Fixes #2338
2020-04-18 23:34:31 +04:30
Christoph Reiter
dced2fbee9 meson: complete introspection build config
Pass the same config to gobject-introspection as with cmake/autotools.

This makes sure the c-include and package name is included in the gir
and also fixes the build because of the missing HB_AAT_H* defines.

Fixes #2336
2020-04-18 17:24:53 +04:30
Ebrahim Byagowi
18fc9197e2 [meson] Run check-symbols.sh and check-static-inits.sh correctly
* Search src/ build directory for objects in check-static-inits.sh
* Find .def files in src/ build directory in src/check-symbols.sh
* Pass builddir also in autotools also, we may just remove libs passing after autotools removal
* Move harfbuzz_subset_def target so can be referenced as a check-static-inits.sh dependency
2020-03-26 09:40:14 +00:00
Ebrahim Byagowi
f0ce56bbd0 [meson] Don't compile test-bimap on msvc either
MSVC doens't like its NullPool,

test-bimap.cc.obj : error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool" (?_hb_NullPool@@3QB_KB) referenced in function
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
22f311e100 [meson] Don't compile noinst_programs in msvc for now 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
7054b12206 [meson] Mark rest of non-install executables explicitly 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
e8808c1c20 [meson] Minor, replace tabs with spaces 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
2db8279162 [meson] Don't compile test-{algs,iter,meta} on msvc 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
3385afacd3 [meson] Don't run check-includes if is amalgam build 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi
6a8a1dc5bb [meson] Port src/ binary artifacts to meson 2020-03-24 19:06:09 +00:00
Tim-Philipp Müller
93b3e30215 [meson] fix icu-related linking errors in test with amalgam build
test-unicode.c:960: undefined reference to `hb_icu_get_unicode_funcs'
test-unicode.c:961: undefined reference to `hb_icu_get_unicode_funcs'

For now add the icu sources to libharfbuzz also for the amalgam
build, later we need to have a separate harfbuzz-icu module and
link against that, and/or generate harfbuzz.cc.
2020-03-14 15:16:00 +03:30
Chun-wei Fan
838346c54a meson: Support GDI integration
...and supersede the configuration option uniscribe with gdi, as Uniscribe is
tightly tied to GDI.  This means that enabling GDI would also mean enabling
Uniscribe.
2020-03-13 14:30:17 +03:30
Chun-wei Fan
4b4d5c295d src/meson.build: Some cleanups for Visual Studio builds
We don't actually need the .def files (vs_module_defs) entry when we are
building DLLs with Visual Studio as long as we have HB_DLL_EXPORT defined.

Plus, to maintain compatibility with the CMake builds, for Visual Studio builds
we do not prefix the libraries with 'lib', nor have a '-0' suffix for the DLL
file name.
2020-03-13 14:30:17 +03:30
Chun-wei Fan
8d425ed446 meson: Fix harfbuzz-gobject builds without introspection
Make the `sources:` field reflect the items depending on whether introspection
is being built
2020-03-13 14:30:17 +03:30
Chun-wei Fan
3341d5346e meson: Don't apply -DHB_DLL_EXPORT to all targets
Only have it apply to the libraries when they are not built statically on
Visual Studio
2020-03-13 14:30:17 +03:30
Ebrahim Byagowi
f8c8be0564 [meson] Add amalgam build option 2020-03-12 00:25:48 +03:30
Aaron Boxer
68f982415b meson: update to latest master 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
535186fd84 meson: provide a harfbuzz-config for use from CMake
See #822 and #1437.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
7eaf3754dc meson: update for changes in master
And remove header files from sources list, Meson figures
out header dependencies by itself (via the compiler).
2020-03-11 19:18:57 +03:30
Khaled Hosny
04438554c8 meson: Update build files after rebase 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
618584e923 meson: rename incbase to incconfig
Makes it clearer what it's for: config.h. See #4.
2020-03-11 19:18:57 +03:30
Khaled Hosny
14b5c774c2 meson: Fix include directory when used as subproject
HarfBuzz headers are under src/ not the root directory, without using
incsrc no headers will be found by the dependent project. I think
incbase is superfluous, it should be replaced by incsrc or dropped.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
6abe7983ed meson: add g-i introspection 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller
d230a02048 meson: generate .def file for MSVC symbol export on the fly
Fix symbol export with MSVC when features are disabled,
such as GLib. We need to generate the list of exported
symbols on the fly to make sure we only export symbols
that are actually available.

Needs some minor modifications to the gen-def.py script:
 - accept header list also via command line args; we can't
   pass things to a configure_file() command via the environment
   in Meson.
 - strip any leading 'src/' from library filename. This might
   be there because in Meson the script might be called from
   the top-level directory and not the current source directory.

Remove .def files again which had been checked in for earlier
versions of the Meson port.
2020-03-11 19:18:57 +03:30