aboutsummaryrefslogtreecommitdiff
path: root/meson.build
blob: 6f6d4ceaf7716ca055548d99a171165d286795f0 (plain)
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
project('paradox', 'objc', version: '0.0.1', meson_version: '>=1.1.0')

add_project_arguments('-Wno-objc-root-class', '-Werror', '-pedantic', '-Wall', '-fobjc-runtime=gnustep-2.0', language: 'objc')  # gnustep-2.0 in this context simply means the libobjc2 runtime (which is made by the GNUstep team), not actually GNUstep. Paradox is an independent framework and has no dependency on GNUstep or any other Objective-C application framework.

if get_option('debug_features')
  add_project_arguments('-DPARADOX_DEBUG_FEATURES', language: 'objc')
endif

deps = []
deps += dependency('libobjc')  # This is libobjc2, not libobjc - do not be fooled

inc = include_directories('include')

sources = [
  'src/Object.m',
]

paradox = static_library('paradox', sources, include_directories: inc, dependencies: deps, install: true, install_dir: 'lib')

install_headers(
  'include/Paradox/Core.h',
  'include/Paradox/Object.h',
  subdir: 'paradox'
)

test_deps = []
test_deps += dependency('libobjc')
test_deps += declare_dependency(link_with: paradox, include_directories: inc, dependencies: deps)

executable('Object', 'tests/Object.m', dependencies: test_deps, install: false)
executable('Introspection', 'tests/Introspection.m', dependencies: test_deps, install: false)
executable('AutoreleasePool', 'tests/AutoreleasePool.m', objc_args: ['-fobjc-arc'], dependencies: test_deps, install: false)

pkg = import('pkgconfig')
pkg.generate(paradox, subdirs: 'paradox', version: '0.0.1', name: 'paradox', filebase: 'paradox', description: 'Application framework for Objective-C built from first principles.', requires: ['libobjc'])