xserver-multidpi/hw/xquartz/meson.build
Jon Turney 655b1eb32e meson: Convert xquartz from autotools
Differences from autotools:

* Autotools defined NO_ALLOCA for OSX builds.  I don't think we need
this anymore as Xalloc.h is no longer used anywhere in the xserver.

* X11.bin is linked with -u,miDCInitialize, and then libserver_mi
provided to satisfy (just) that.  It's been that way since the commit
which added it.  We can't write the equivalent in meson due to linker
argument ordering issues, but do we really need to?

* An explicit -Dsecure-rpc=false is required for OSX, since in meson we
don't do the checks that XTRANS_SECURE_RPC_FLAGS did for the existence
of the specific RPC functions required.
2019-05-02 15:42:58 +00:00

78 lines
2.0 KiB
Meson

add_languages('objc')
apple_applications_dir = get_option('apple-applications-dir')
apple_application_name = get_option('apple-application-name')
bundle_id_prefix = get_option('bundle-id-prefix')
xquartz_sparkle_feed_url = get_option('sparkle-feed-url')
bundle_version_string = meson.project_version() # CFBundleShortVersionString
bundle_version = release # CFBundleVersion
bundle_id_def = '-DBUNDLE_ID_PREFIX="@0@"'.format(bundle_id_prefix)
bundle_root = join_paths(apple_applications_dir, apple_application_name + '.app')
# using sparkle update framework?
build_sparkle = xquartz_sparkle_feed_url != ''
if build_sparkle
sparkle = dependency('Sparkle', method: 'extraframework')
endif
# libxquartz
srcs_libxquartz = [
'X11Application.m',
'X11Controller.m',
'applewm.c',
'darwin.c',
'darwinEvents.c',
'darwinXinput.c',
'keysym2ucs.c',
'quartz.c',
'quartzCocoa.m',
'quartzKeyboard.c',
'quartzStartup.c',
'quartzRandR.c',
'console_redirect.c',
'../../mi/miinitext.c',
]
libxquartz_defs = [
'-DINXQUARTZ',
'-DUSE_NEW_CLUT',
'-DX11LIBDIR="@0@"'.format(join_paths(get_option('prefix'),
get_option('libdir'))),
'-DXFree86Server',
'-DXQUARTZ',
'-DXSERVER_VERSION="@0@"'.format(meson.project_version()),
bundle_id_def,
]
if cc.has_function('dispatch_async')
libxquartz_defs += '-DHAVE_LIBDISPATCH'
endif
libXquartz = static_library('Xquartz',
srcs_libxquartz,
c_args: libxquartz_defs,
objc_args: libxquartz_defs,
include_directories: [inc, '../../pseudoramiX', '../../miext/rootless', top_dir_inc],
dependencies: [xproto_dep, pixman_dep],
link_with: [libxserver_pseudoramix, libxserver_miext_rootless],
)
subdir('bundle')
if build_glx
subdir('GL')
endif
subdir('pbproxy')
subdir('xpr')
subdir('mach-startup')
# manpage
xquartz_man = configure_file(
input: 'man/Xquartz.man',
output: 'Xquartz.1',
configuration: manpage_config,
)
install_man(xquartz_man)