ObjSQLite3  Check-in [da6b5c90d4]

Overview
Comment:Improve meson.build files
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: da6b5c90d4fae43b05b79b391bc53e391ce491867776a1ac3fb84c6de1a57359
User & Date: js on 2024-08-06 21:56:55
Other Links: manifest | tags
Context
2024-08-07
20:21
Set soversion check-in: 3e0861a934 user: js tags: trunk
2024-08-06
21:56
Improve meson.build files check-in: da6b5c90d4 user: js tags: trunk
2024-08-05
00:28
Fix different signedness in comparison warning check-in: 23b9889d29 user: js tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [fff69385a5] to [3c1b54570e].

1
2
build
ObjSQLite3.oc

<
1

build

Modified meson.build from [3eadd6eeb5] to [6941d753bc].

1
2
3
4
5
6
7
8
9
10
11



12
13
14
15


16







17
18
19
20
21
22
23
24
25
26
27
28
29
30
project('ObjSQLite3', 'objc',
  version: '0.1',
  meson_version: '>= 1.5.0',
  default_options: {
    'warning_level': '3',
  })

objfw_dep = dependency('objfw')
sqlite3_dep = dependency('sqlite3')

incdir = include_directories(['src', 'src/exceptions'])




# Meson unfortunately does not allow access to the flags of sqlite3_dep.
pkgconfig = find_program('pkg-config')
sqlite3_cflags = run_command([pkgconfig, '--cflags', 'sqlite3'], check: true)


sqlite3_libs = run_command([pkgconfig, '--libs', 'sqlite3'], check: true)








configure_file(
  input: 'ObjSQLite3.oc.in',
  output: 'ObjSQLite3.oc',
  configuration: {
    'libdir': get_option('prefix') / get_option('libdir'),
    'SQLITE3_CPPFLAGS': sqlite3_cflags.stdout().strip(),
    'SQLITE3_LIBS': sqlite3_libs.stdout().strip(),
  },
  install: true,
  install_dir: get_option('libdir') / 'objfw-config')

subdir('src')
subdir('tests')










|
>
>
>



|
>
>
|
>
>
>
>
>
>
>






|
|


|
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39



project('ObjSQLite3', 'objc',
  version: '0.1',
  meson_version: '>= 1.5.0',
  default_options: {
    'warning_level': '3',
  })

objfw_dep = dependency('objfw')
sqlite3_dep = dependency('sqlite3')

incdir = include_directories('src', 'src/exceptions')

subdir('src')
subdir('tests')

# Meson unfortunately does not allow access to the flags of sqlite3_dep.
pkgconfig = find_program('pkg-config')
sqlite3_cflags = run_command(
  [pkgconfig, '--cflags', 'sqlite3'],
  check: true).stdout().strip()
sqlite3_libs = run_command(
  [pkgconfig, '--libs', 'sqlite3'],
  check: true).stdout().strip()

objfwconfig = find_program('objfw-config')
packages_dir = run_command(
  [objfwconfig, '--packages-dir'],
  check: true).stdout().strip()

configure_file(
  input: 'ObjSQLite3.oc.in',
  output: 'ObjSQLite3.oc',
  configuration: {
    'libdir': get_option('prefix') / get_option('libdir'),
    'SQLITE3_CPPFLAGS': sqlite3_cflags,
    'SQLITE3_LIBS': sqlite3_libs,
  },
  install: true,
  install_dir: packages_dir)



Added src/exceptions/meson.build version [63bb90a36e].



















>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
exceptions_sources = files(
  'SL3BindObjectFailedException.m',
  'SL3ClearBindingsFailedException.m',
  'SL3Exception.m',
  'SL3ExecuteStatementFailedException.m',
  'SL3OpenFailedException.m',
  'SL3PrepareStatementFailedException.m',
  'SL3ResetStatementFailedException.m',
)

Modified src/meson.build from [b306796aaa] to [d144a32045].


1

2

3
4

5
6

7
8
9
10
11
12
13
14
15
16
17
18



19
20
21
22
23
24
25
26
27
28
29
30
31

objsqlite3 = library('objsqlite3',

  [

    'SL3Connection.m',
    'SL3PreparedStatement.m',

    'exceptions/SL3BindObjectFailedException.m',
    'exceptions/SL3ClearBindingsFailedException.m',

    'exceptions/SL3Exception.m',
    'exceptions/SL3ExecuteStatementFailedException.m',
    'exceptions/SL3OpenFailedException.m',
    'exceptions/SL3PrepareStatementFailedException.m',
    'exceptions/SL3ResetStatementFailedException.m',
  ],
  include_directories: incdir,
  objc_args: ['-DSL3_PUBLIC_IVARS'],
  dependencies: [objfw_dep, sqlite3_dep],
  install: true)

install_headers(



  [
    'ObjSQLite3.h',
    'SL3Connection.h',
    'SL3PreparedStatement.h',
    'exceptions/SL3BindObjectFailedException.h',
    'exceptions/SL3ClearBindingsFailedException.h',
    'exceptions/SL3Exception.h',
    'exceptions/SL3ExecuteStatementFailedException.h',
    'exceptions/SL3OpenFailedException.h',
    'exceptions/SL3PrepareStatementFailedException.h',
    'exceptions/SL3ResetStatementFailedException.h',
  ],
  subdir: 'ObjSQLite3')
>
|
>
|
>
|
|
>
|
<
>
|
<
<
<
<
<





|
>
>
>
|
<
<
<
<
<
<
<
<
<
<
<
|
1
2
3
4
5
6
7
8
9

10
11





12
13
14
15
16
17
18
19
20
21











22
fs = import('fs')

subdir('exceptions')

sources = files(
  'SL3Connection.m',
  'SL3PreparedStatement.m',
)


objsqlite3 = library('objsqlite3',
  sources + exceptions_sources,





  include_directories: incdir,
  objc_args: ['-DSL3_PUBLIC_IVARS'],
  dependencies: [objfw_dep, sqlite3_dep],
  install: true)

headers = ['ObjSQLite3.h']
foreach source: sources + exceptions_sources
  headers += fs.replace_suffix(source.full_path(), '.h')
endforeach












install_headers(headers, subdir: 'ObjSQLite3')

Modified tests/meson.build from [4ebc7f4ac0] to [b3f1289f8f].

1
2
3
4
5
testexe = executable('tests', 'Tests.m',
  dependencies: [objfw_dep],
  link_with: objsqlite3,
  include_directories: incdir)
test('ObjSQLite3 tests', testexe)

|



1
2
3
4
5
testexe = executable('tests', 'Tests.m',
  dependencies: objfw_dep,
  link_with: objsqlite3,
  include_directories: incdir)
test('ObjSQLite3 tests', testexe)