From a0fa5da681bf2f6c5e50435f29583a490253f995 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 21 May 2020 11:28:40 -0400 Subject: meson revert to direct use of dub --- meson.build | 10 ++++---- org/spine_build_scaffold.org | 16 ++++++------ subprojects/d2sqlite3.meson.build | 48 ------------------------------------ subprojects/imageformats.meson.build | 40 ------------------------------ 4 files changed, 13 insertions(+), 101 deletions(-) delete mode 100644 subprojects/d2sqlite3.meson.build delete mode 100644 subprojects/imageformats.meson.build diff --git a/meson.build b/meson.build index 76e0782..cc644a6 100644 --- a/meson.build +++ b/meson.build @@ -48,12 +48,12 @@ spine_src = [ 'src/doc_reform/share/defaults.d', ] source_root = meson.source_root() -src_dir = include_directories('src/', 'subprojects/') +src_dir = include_directories('src/') # Dependencies -dep_tinyendian = dependency('tinyendian', version: '>= 0.2.0', fallback: ['tinyendian', 'tinyendian_dep']) -dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep']) -dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.18.3', fallback: ['d2sqlite3', 'd2sqlite3_dep']) -dep_imageformats = dependency('imageformats', version: '>= 7.0.2', fallback: ['imageformats', 'imageformats_dep']) +dep_tinyendian = dependency('tinyendian', version: '>= 0.2.0', fallback: ['tinyendian', 'tinyendian_dep'], method: 'dub') +dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep'], method: 'dub') +dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.18.3', fallback: ['d2sqlite3', 'd2sqlite3_dep'], method: 'dub') +dep_imageformats = dependency('imageformats', version: '>= 7.0.2', fallback: ['imageformats', 'imageformats_dep'], method: 'dub') # Executable spine_exe = executable('spine', [spine_src], diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index 8da968c..c18b599 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -1087,12 +1087,12 @@ spine_src = [ 'src/doc_reform/share/defaults.d', ] source_root = meson.source_root() -src_dir = include_directories('src/', 'subprojects/') +src_dir = include_directories('src/') # Dependencies -dep_tinyendian = dependency('tinyendian', version: '>= 0.2.0', fallback: ['tinyendian', 'tinyendian_dep']) -dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep']) -dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.18.3', fallback: ['d2sqlite3', 'd2sqlite3_dep']) -dep_imageformats = dependency('imageformats', version: '>= 7.0.2', fallback: ['imageformats', 'imageformats_dep']) +dep_tinyendian = dependency('tinyendian', version: '>= 0.2.0', fallback: ['tinyendian', 'tinyendian_dep'], method: 'dub') +dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep'], method: 'dub') +dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.18.3', fallback: ['d2sqlite3', 'd2sqlite3_dep'], method: 'dub') +dep_imageformats = dependency('imageformats', version: '>= 7.0.2', fallback: ['imageformats', 'imageformats_dep'], method: 'dub') # Executable spine_exe = executable('spine', [spine_src], @@ -1108,7 +1108,7 @@ spine_exe = executable('spine', ) #+END_SRC -** meson subprojects [can be taken care of using dub] +** meson subprojects [taken care of using dub] *** README #+BEGIN_SRC txt :tangle ../subprojects/README @@ -1148,7 +1148,7 @@ revision = head **** meson.build -#+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.meson.build +#+BEGIN_SRC sh :NO-tangle ../subprojects/d2sqlite3.meson.build project('d2sqlite3', 'd', meson_version: '>=0.46', license: 'BSL-1.0', @@ -1298,7 +1298,7 @@ revision = head **** meson.build -#+BEGIN_SRC sh :tangle ../subprojects/imageformats.meson.build +#+BEGIN_SRC sh :NO-tangle ../subprojects/imageformats.meson.build project('imageformats', 'd', meson_version: '>=0.46', license: 'BSL-1.0', diff --git a/subprojects/d2sqlite3.meson.build b/subprojects/d2sqlite3.meson.build deleted file mode 100644 index 1685738..0000000 --- a/subprojects/d2sqlite3.meson.build +++ /dev/null @@ -1,48 +0,0 @@ -project('d2sqlite3', 'd', - meson_version: '>=0.46', - license: 'BSL-1.0', - version: '0.18.3' -) - -project_soversion = '0' - -src_dir = include_directories('source/') -pkgc = import('pkgconfig') - -sqlite_dep = dependency('sqlite3') - -d2sqlite3_src = [ - 'source/d2sqlite3/database.d', - 'source/d2sqlite3/internal/memory.d', - 'source/d2sqlite3/internal/util.d', - 'source/d2sqlite3/library.d', - 'source/d2sqlite3/package.d', - 'source/d2sqlite3/results.d', - 'source/d2sqlite3/sqlite3.d', - 'source/d2sqlite3/statement.d', -] -install_subdir('source/d2sqlite3/', install_dir: 'include/d/d2sqlite3/') - -d2sqlite3_lib = library('d2sqlite3', - [d2sqlite3_src], - include_directories: [src_dir], - dependencies: [sqlite_dep], - install: true, - version: meson.project_version(), - soversion: project_soversion -) - -pkgc.generate(name: 'd2sqlite3', - libraries: d2sqlite3_lib, - subdirs: 'd/d2sqlite3/', - version: meson.project_version(), - requires: ['sqlite3'], - description: 'A small wrapper around SQLite for the D programming language.' -) - -# for use by others which embed this as subproject -d2sqlite3_dep = declare_dependency( - link_with: [d2sqlite3_lib], - dependencies: [sqlite_dep], - include_directories: [src_dir] -) diff --git a/subprojects/imageformats.meson.build b/subprojects/imageformats.meson.build deleted file mode 100644 index 7c05434..0000000 --- a/subprojects/imageformats.meson.build +++ /dev/null @@ -1,40 +0,0 @@ -project('imageformats', 'd', - meson_version: '>=0.46', - license: 'BSL-1.0', - version: '7.0.2' -) - -project_soversion = '0' - -src_dir = include_directories('.') -pkgc = import('pkgconfig') - -imageformats_src = [ - 'imageformats/bmp.d', - 'imageformats/jpeg.d', - 'imageformats/package.d', - 'imageformats/png.d', - 'imageformats/tga.d' -] -install_subdir('imageformats/', install_dir: 'include/d/imageformats-d/') - -imageformats_lib = library('imageformats-d', - [imageformats_src], - include_directories: [src_dir], - install: true, - version: meson.project_version(), - soversion: project_soversion -) - -pkgc.generate(name: 'imageformats-d', - libraries: imageformats_lib, - subdirs: 'd/imageformats-d/', - version: meson.project_version(), - description: 'Decoders for PNG, TGA, BMP, JPEG and encoders for PNG, TGA, BMP.' -) - -# for use by others which embed this as subproject -imageformats_dep = declare_dependency( - link_with: [imageformats_lib], - include_directories: [src_dir] -) -- cgit v1.2.3