2023-05-07 22:30:57 +02:00
|
|
|
project(
|
|
|
|
'spmenu',
|
|
|
|
'c',
|
2023-05-12 14:33:19 +02:00
|
|
|
version : '"1.1.2"',
|
2023-05-07 22:30:57 +02:00
|
|
|
default_options : ['warning_level=3']
|
|
|
|
)
|
|
|
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
|
|
|
project_source_files = [
|
2023-05-10 08:20:29 +02:00
|
|
|
'libs/libdrw/drw.c',
|
2023-05-07 22:30:57 +02:00
|
|
|
'spmenu.c',
|
|
|
|
'libs/sl/main.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
project_dependencies = [
|
|
|
|
dependency('x11'),
|
|
|
|
dependency('xrender'),
|
|
|
|
dependency('freetype2'),
|
|
|
|
dependency('xft'),
|
|
|
|
cc.find_library('m', required : false),
|
|
|
|
]
|
|
|
|
|
|
|
|
build_args = [
|
|
|
|
'-DVERSION=' + meson.project_version(),
|
|
|
|
|
|
|
|
'-D_DEFAULT_SOURCE',
|
|
|
|
'-D_BSD_SOURCE',
|
|
|
|
'-D_XOPEN_SOURCE=700L',
|
|
|
|
'-D_POSIX_C_SOURCE=200809L',
|
|
|
|
|
|
|
|
'-std=c99',
|
|
|
|
'-pedantic',
|
|
|
|
'-Wall',
|
|
|
|
'-Wno-deprecated-declarations',
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-Wno-sign-compare',
|
|
|
|
]
|
|
|
|
|
2023-05-09 12:03:53 +02:00
|
|
|
if get_option('imlib2') and get_option('openssl')
|
2023-05-07 22:30:57 +02:00
|
|
|
project_dependencies += [ dependency('imlib2') ]
|
|
|
|
project_dependencies += [ dependency('openssl') ]
|
|
|
|
build_args += [ '-DIMAGE' ]
|
|
|
|
endif
|
|
|
|
|
2023-05-09 12:03:53 +02:00
|
|
|
if get_option('fribidi')
|
2023-05-07 22:30:57 +02:00
|
|
|
project_dependencies += [ dependency('fribidi') ]
|
|
|
|
build_args += [ '-DRTL' ]
|
|
|
|
endif
|
|
|
|
|
2023-05-09 12:03:53 +02:00
|
|
|
if get_option('xinerama')
|
2023-05-07 22:30:57 +02:00
|
|
|
project_dependencies += [ dependency('xinerama') ]
|
|
|
|
build_args += [ '-DXINERAMA' ]
|
|
|
|
endif
|
|
|
|
|
2023-05-09 12:03:53 +02:00
|
|
|
if get_option('pango') and get_option('pangoxft')
|
2023-05-07 22:30:57 +02:00
|
|
|
project_dependencies += [ dependency('pango') ]
|
|
|
|
project_dependencies += [ dependency('pangoxft') ]
|
|
|
|
build_args += [ '-DPANGO' ]
|
2023-05-08 16:58:46 +02:00
|
|
|
else
|
|
|
|
project_dependencies += [ dependency('fontconfig') ]
|
2023-05-07 22:30:57 +02:00
|
|
|
endif
|
|
|
|
|
2023-05-09 12:03:53 +02:00
|
|
|
if get_option('libconfig')
|
2023-05-07 22:30:57 +02:00
|
|
|
project_dependencies += [ dependency('libconfig') ]
|
|
|
|
build_args += [ '-DCONFIG' ]
|
|
|
|
endif
|
|
|
|
|
2023-05-09 12:03:53 +02:00
|
|
|
if get_option('xresources')
|
2023-05-07 22:30:57 +02:00
|
|
|
build_args += [ '-DXRESOURCES' ]
|
|
|
|
endif
|
|
|
|
|
2023-05-11 16:46:32 +02:00
|
|
|
if get_option('utf8')
|
|
|
|
build_args += [ '-DUTF8' ]
|
|
|
|
endif
|
|
|
|
|
2023-05-07 22:30:57 +02:00
|
|
|
project_target = executable(
|
|
|
|
meson.project_name(),
|
2023-05-08 10:43:42 +02:00
|
|
|
project_source_files, install : true,
|
2023-05-07 22:30:57 +02:00
|
|
|
dependencies: project_dependencies,
|
|
|
|
c_args : build_args,
|
|
|
|
)
|
|
|
|
|
2023-05-08 10:43:42 +02:00
|
|
|
install_man('spmenu.1')
|
2023-05-16 20:50:08 +02:00
|
|
|
install_man('spmenu_run.1')
|
2023-05-08 10:43:42 +02:00
|
|
|
install_data(sources : 'docs/docs.md', install_dir : 'share/spmenu')
|
|
|
|
install_data(sources : 'docs/code-docs.md', install_dir : 'share/spmenu')
|
|
|
|
install_data(sources : 'docs/example.Xresources', install_dir : 'share/spmenu')
|
|
|
|
install_data(sources : 'docs/spmenu.conf', install_dir : 'share/spmenu')
|
2023-05-13 00:25:50 +02:00
|
|
|
install_data(sources : 'docs/spmenu_run.desktop', install_dir : 'share/applications')
|
|
|
|
install_data(sources : 'docs/spmenu_desktop.desktop', install_dir : 'share/applications')
|
|
|
|
install_data(sources : 'docs/spmenu_filemanager.desktop', install_dir : 'share/applications')
|
2023-05-13 01:22:40 +02:00
|
|
|
install_data(sources : 'docs/spmenu.svg', install_dir : 'share/icons/hicolor/scalable/apps')
|
2023-05-08 10:43:42 +02:00
|
|
|
install_data(sources : 'scripts/spmenu_run', install_dir : 'bin')
|
|
|
|
install_data(sources : 'scripts/spmenu_test', install_dir : 'bin')
|
|
|
|
|
2023-05-07 22:30:57 +02:00
|
|
|
test('spmenu', project_target)
|