aboutsummaryrefslogtreecommitdiff
path: root/src/meson.build
blob: 3494112db012f9b9240ef578373545391d11835b (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# poi
poi_moc = mod_qt5.preprocess(
    moc_headers: ['browser.h',
        'mainwindow/mainwindow.h', 'mainwindow/addressbar.h', 'mainwindow/menubar.h', 'mainwindow/widgets/completer.h', 'mainwindow/widgets/urllineedit.h', 'mainwindow/widgets/dockwidget.h', 'mainwindow/widgets/menusearch.h', 'mainwindow/widgets/navigationbar.h', 'mainwindow/widgets/searchform.h',
        'session/savesessiondialog.h', 'session/sessiondialog.h', 'session/sessionform.h',
        'subwindow/subwindow.h', 'subwindow/tabwidget.h',
        'webengine/urlinterceptor.h', 'webengine/webpage.h', 'webengine/webview.h', 'webengine/webprofilemanager.h', 'webengine/webprofile.h'],
    ui_files: ['mainwindow/addressbar.ui', 'mainwindow/widgets/searchform.ui', 'session/savesessiondialog.ui', 'session/sessiondialog.ui', 'session/sessionform.ui'],
    qresources: '../data/resources.qrc',
    rcc_extra_arguments: ['--format-version=1'],
    dependencies: dep_qt5
)

poi = executable(get_option('poiName'), install: true,
    cpp_args: ['-DQAPPLICATION_CLASS=QApplication'],
    dependencies: [dep_qt5, dep_spdlog, dep_SingleApplication, dep_args, optional_deps,
        dep_about, dep_bookmarks, dep_configuration, dep_downloads, dep_pluginloader, dep_urlfilter],
    include_directories: [include],
    sources: ['main.cpp', 'builtins.cpp', 'crashhandler.cpp', poi_moc, version_h,
    'browser.cpp',
    'util.cpp', 'util.h',

    'mainwindow/mainwindow.cpp',
    'mainwindow/addressbar.cpp',
    'mainwindow/menubar.cpp',
    'mainwindow/widgets/completer.cpp',
    'mainwindow/widgets/urllineedit.cpp',
    'mainwindow/widgets/dockwidget.cpp',
    'mainwindow/widgets/menusearch.cpp',
    'mainwindow/widgets/navigationbar.cpp',
    'mainwindow/widgets/searchform.cpp',

    'session/session.cpp',
    'session/savesessiondialog.cpp',
    'session/sessiondialog.cpp',
    'session/sessionform.cpp',

    'subwindow/subwindow.cpp',
    'subwindow/tabwidget.cpp',

    'webengine/urlinterceptor.cpp',
    'webengine/webpage.cpp',
    'webengine/webview.cpp',
    'webengine/webprofile.cpp',
    'webengine/webprofilemanager.cpp',
    interfaces_moc,

    'wallet/wallet.cpp', 'wallet/wallet.h']
)

# install .desktop file and firejail profile for systems in this array
if ['linux'].contains(host_machine.system())
    conf = configuration_data({
        'exec_poi': get_option('prefix') / get_option('bindir') / get_option('poiName'),
        'firejail': get_option('firejail'),
        'firejail_profile': get_option('prefix') / get_option('libdir') / 'smolbote/poi.profile'
    })

    # application icon
    install_data('../data/poi.svg', install_dir: get_option('datadir') / 'icons/hicolor/scalable/apps')

    # firejail profile
    install_data('../linux/firejail/poi.profile', install_dir: get_option('libdir') / 'smolbote')

    # Install .desktop to $prefix/share/applications
    desktop_install_dir = get_option('datadir') / 'applications'
    configure_file(input: '../linux/poi.desktop.in',             output: 'poi.desktop',             configuration: conf, install_dir: desktop_install_dir )
    configure_file(input: '../linux/poi_firejail.desktop.in',    output: 'poi_firejail.desktop',    configuration: conf, install_dir: desktop_install_dir )
    configure_file(input: '../linux/poi_picksession.desktop.in', output: 'poi_picksession.desktop', configuration: conf, install_dir: desktop_install_dir )

endif