~mmach/netext73/xorg-server

« back to all changes in this revision

Viewing changes to hw/xquartz/meson.build

  • Committer: mmach
  • Date: 2022-09-22 10:05:52 UTC
  • Revision ID: netbit73@gmail.com-20220922100552-lmga4nzzyp3ou2of
21.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
apple_application_name = get_option('apple-application-name')
5
5
bundle_id_prefix = get_option('bundle-id-prefix')
6
6
xquartz_sparkle_feed_url = get_option('sparkle-feed-url')
7
 
 
8
 
bundle_version_string = meson.project_version() # CFBundleShortVersionString
9
 
bundle_version = release                        # CFBundleVersion
 
7
xquartz_sparkle_public_edkey = get_option('sparkle-public-edkey')
 
8
 
 
9
bundle_version_string = get_option('bundle-version-string') # CFBundleShortVersionString
 
10
if bundle_version_string == 'auto'
 
11
    bundle_version_string = meson.project_version()
 
12
endif
 
13
 
 
14
bundle_version = get_option('bundle-version') # CFBundleVersion
 
15
if bundle_version == 'auto'
 
16
    version_arr = bundle_version_string.split('.')
 
17
    version_major = version_arr[0].to_int()
 
18
    version_minor = version_arr[1].to_int()
 
19
    version_tiny = version_arr[2].to_int()
 
20
    bundle_version = '@0@.@1@.@2@'.format(version_major, version_minor, version_tiny)
 
21
endif
10
22
 
11
23
bundle_id_def = '-DBUNDLE_ID_PREFIX="@0@"'.format(bundle_id_prefix)
12
24
 
13
25
bundle_root = join_paths(apple_applications_dir, apple_application_name + '.app')
14
26
 
15
27
# using sparkle update framework?
16
 
build_sparkle = xquartz_sparkle_feed_url != ''
 
28
build_sparkle = xquartz_sparkle_feed_url != '' and xquartz_sparkle_public_edkey != ''
17
29
if build_sparkle
18
30
    sparkle = dependency('Sparkle', method: 'extraframework')
 
31
 
 
32
    sparkle_defs = [
 
33
        '-DXQUARTZ_SPARKLE',
 
34
        '-DXQUARTZ_SPARKLE_FEED_URL=@0@'.format(xquartz_sparkle_feed_url),
 
35
        '-DXQUARTZ_SPARKLE_PUBLIC_EDKEY=@0@'.format(xquartz_sparkle_public_edkey),
 
36
    ]
 
37
else
 
38
    sparkle_defs = []
19
39
endif
20
40
 
21
41
# libxquartz
22
42
srcs_libxquartz = [
 
43
    'NSUserDefaults+XQuartzDefaults.m',
23
44
    'X11Application.m',
24
45
    'X11Controller.m',
25
46
    'applewm.c',
43
64
    '-DXQUARTZ',
44
65
    '-DXSERVER_VERSION="@0@"'.format(meson.project_version()),
45
66
    bundle_id_def,
 
67
    sparkle_defs,
46
68
]
47
69
 
48
70
if cc.has_function('dispatch_async')