meson: Define srcdir and builddir using meson functions

No need to redefine paths starting from top src/build dirs, as meson can give us
this information for free using its functions.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/442
This commit is contained in:
Marco Trevisan (Treviño)
2019-04-04 22:35:44 -04:00
committed by Marco Trevisan
parent 8374be46d2
commit 63c40a9711
9 changed files with 9 additions and 20 deletions

View File

@ -1,6 +1,3 @@
clutter_tests_conform_srcdir = join_paths(clutter_srcdir, 'tests/conform')
clutter_tests_conform_builddir = join_paths(clutter_builddir, 'tests/conform')
clutter_tests_conform_c_args = [
'-DG_LOG_DOMAIN="Clutter-Conform"',
'-DCOGL_DISABLE_DEPRECATION_WARNINGS',
@ -52,8 +49,8 @@ clutter_conform_tests += clutter_conform_tests_general_tests
clutter_conform_tests += clutter_conform_tests_deprecated_tests
test_env = environment()
test_env.set('G_TEST_SRCDIR', clutter_tests_conform_srcdir)
test_env.set('G_TEST_BUILDDIR', clutter_tests_conform_builddir)
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
test_env.set('G_ENABLE_DIAGNOSTIC', '0')
test_env.set('CLUTTER_ENABLE_DIAGNOSTIC', '0')
test_env.set('CLUTTER_SCALE', '1')

View File

@ -1,7 +1,5 @@
clutter_tests_interactive_srcdir = join_paths(clutter_srcdir, 'tests/interactive')
clutter_tests_interactive_srcdir = meson.current_source_dir()
clutter_tests_interactive_includepath = include_directories('.')
#clutter_tests_interactive_builddir = join_paths(clutter_builddir, 'tests/interactive')
clutter_tests_interactive_c_args = [
'-DTESTS_DATADIR="@0@"'.format(clutter_tests_interactive_srcdir),

View File

@ -1,5 +1,5 @@
clutter_tests_performance_c_args = [
'-DTESTS_DATA_DIR="@0@"'.format(join_paths(clutter_srcdir, 'tests/interactive')),
'-DTESTS_DATA_DIR="@0@"'.format(clutter_tests_interactive_srcdir),
'-DG_DISABLE_SINGLE_INCLUDES',
'-DGLIB_DISABLE_DEPRECATION_WARNINGS',
'-DCOGL_DISABLE_DEPRECATION_WARNINGS',