summaryrefslogtreecommitdiff
path: root/src/meson.build
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2021-08-30 07:27:44 +0930
committerAdrian Johnson <ajohnson@redneon.com>2023-01-02 22:43:39 +1030
commite8b622ebe63e8e1000ba2b7c60f54143a5376363 (patch)
treea969149c2c08e25a4817e87922cd5b4ab1eeeb39 /src/meson.build
parent7f83c30943951d87b24913452f94fb529ce7504f (diff)
downloadcairo-e8b622ebe63e8e1000ba2b7c60f54143a5376363.tar.gz
Support check-def.sh in meson build
The original check-def.sh called make. In meson, check-def.sh is replaced by two shell scripts, one for generating cairo.def, the other for comparing with the library symbols. The library filename appended to the cairo.def has been omitted as this is only reqired in autotools builds where the cairo.def is also to generate cairo.dll in the windows build. make-cairo-def.sh is based on the cairo.def target in Makefile.am. meson-check-def.sh is based on check-def.sh
Diffstat (limited to 'src/meson.build')
-rw-r--r--src/meson.build21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/meson.build b/src/meson.build
index f8e2290f2..abb04e1ff 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -278,7 +278,8 @@ libcairo = library('cairo', cairo_sources,
include_directories: incbase,
)
-cairo_headers += [configure_file(output: 'cairo-features.h', configuration: feature_conf)]
+cairo_features_file = configure_file(output: 'cairo-features.h', configuration: feature_conf)
+cairo_headers += [cairo_features_file]
libcairo_dep = declare_dependency(link_with: libcairo,
dependencies: deps,
@@ -298,9 +299,6 @@ install_headers(cairo_headers, subdir: 'cairo')
shell = find_program('sh', required: false)
if shell.found()
test_scripts = [
- # This script calls back into make to generate cairo.def
- # TODO: Make this work, somehow
- #'check-def.sh',
'check-doc-syntax.sh',
'check-headers.sh',
'check-preprocessor-syntax.sh',
@@ -316,6 +314,21 @@ if shell.found()
env = environment()
env.set('CAIRO_HAS_HIDDEN_SYMBOLS', '1')
+ cairo_def = custom_target('make-cairo-def',
+ input : cairo_headers,
+ output : 'cairo.def',
+ command : [ shell,
+ meson.current_source_dir()/'make-cairo-def.sh',
+ '@OUTPUT@',
+ cairo_features_file,
+ '@INPUT@'
+ ])
+
+ test('check-def', shell,
+ args: ['meson-check-def.sh', cairo_def, libcairo ],
+ env: env,
+ workdir: meson.current_source_dir())
+
test('check-plt.sh', shell,
args: ['check-plt.sh', libcairo ],
env: env,