Newer
Older
project('harbour-spoon', 'cpp', default_options: ['cpp_std=c++14', 'b_pie=true'])
qt5 = import('qt5')
qt5_dep = dependency('qt5', modules: ['Core', 'Qml', 'Quick'])
inc = include_directories('src')
cmake_pref = get_option('cget_prefix')
boost_dep = dependency('boost', modules : [
'atomic',
'chrono',
'date_time',
'iostreams',
'random',
'regex',
'system',
'thread'
], static: true)
zlib_dep = dependency('zlib')
olm_dep = dependency('Olm', method : 'cmake', cmake_module_path : cmake_pref + '/Olm', static: true)
matrix_dep = dependency('MatrixClient', method : 'cmake', cmake_module_path : cmake_pref + '/MatrixClient', static: true)
json_dep = dependency('nlohmann_json', method : 'cmake', modules : ['nlohmann_json::nlohmann_json'], cmake_module_path : cmake_pref + '/nlohmann_json', static: true)
ssl_dep = dependency('OpenSSL', static: true)
sailfish_dep = dependency('sailfishapp')
threads_dep = dependency('threads')
deps = [qt5_dep, zlib_dep, olm_dep, matrix_dep, json_dep, ssl_dep, sailfish_dep, threads_dep, boost_dep]
defines = ['-DBOOST_MPL_LIMIT_LIST_SIZE=30', '-DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS=1', '-DBOOST_ASIO_DISABLE_EPOLL']
moc_files = qt5.preprocess(moc_headers :
[
'src/client.h',
'src/login.h',
'src/settings.h',
'src/models/roommodel.h',
'src/models/roomlistmodel.h'
],
moc_extra_arguments: defines, include_directories: inc,
dependencies: deps)
sources = [
'src/login.cpp',
'src/settings.cpp',
'src/models/roommodel.cpp',
'src/models/roomlistmodel.cpp'
translations = qt5.compile_translations(ts_files : ['translations/harbour-spoon.ts', 'translations/harbour-spoon-de.ts'], build_by_default : true)
executable('harbour-spoon',
sources, moc_files,
include_directories: inc,
dependencies : deps,
cpp_args : defines,
install_subdir('qml', install_dir: 'share/harbour-spoon')
install_data('harbour-spoon.desktop', install_dir: 'share/applications')
install_dir: 'share/applications')
install_dir: 'share/icons/hicolor/86x86/apps')
install_dir: 'share/icons/hicolor/108x108/apps')
install_dir: 'share/icons/hicolor/128x128/apps')
# install_dir: 'share/icons/hicolor/256x256/apps')
install_dir: 'share/icons/hicolor/172x172/apps')