forked from bernhardfritz/pobfrontend
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmeson.build
41 lines (34 loc) · 1.69 KB
/
meson.build
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
project('POB Frontend', 'cpp', default_options : ['cpp_std=c++17'])
qt5_dep = dependency('qt5', modules : ['Gui','Core','Widgets'])
lua_dep = dependency('luajit')
# NB on OSX you also need to invoke meson like so, because luajit:
# LDFLAGS="-pagezero_size 10000 -image_base 100000000" meson pobfrontend build
if build_machine.system() == 'darwin'
gl_dep = dependency('appleframeworks', modules: ['OpenGL'])
else
gl_dep = dependency('gl')
endif
zlib_dep = dependency('zlib')
curl_dep = dependency('libcurl')
# Added flag based on https://stackoverflow.com/a/37729971/319066
# and arguments based on https://mesonbuild.com/Adding-arguments.html
compiler_arguments = ['-mmacosx-version-min=10.12', '-isysroot', '/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk']
add_project_arguments(compiler_arguments , language : 'c')
add_project_arguments(compiler_arguments, language : 'cpp')
linker_arguments = ['-mmacosx-version-min=10.12', '-isysroot', '/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk']
add_project_link_arguments(linker_arguments, language : 'c')
add_project_link_arguments(linker_arguments, language : 'cpp')
# Import the extension module that knows how
# to invoke Qt tools.
qt5 = import('qt5')
prep = qt5.preprocess(moc_headers : ['subscript.hpp', 'pobwindow.hpp'])
executable('PathOfBuilding',
sources : ['main.cpp', prep],
dependencies : [qt5_dep, gl_dep, zlib_dep, lua_dep, curl_dep],
install : true)
if build_machine.system() == 'darwin'
install_data('pobLogo.icns', install_dir : 'Contents/Resources')
install_data('Info.plist', install_dir : 'Contents')
install_data('pobWrapper.sh', install_dir : 'Contents/MacOS')
meson.add_install_script('mesonInstaller.sh')
endif