summaryrefslogtreecommitdiffstats
path: root/manual tests/4 standalone binaries/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /manual tests/4 standalone binaries/meson.build
parentInitial commit. (diff)
downloadmeson-upstream.tar.xz
meson-upstream.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'manual tests/4 standalone binaries/meson.build')
-rw-r--r--manual tests/4 standalone binaries/meson.build38
1 files changed, 38 insertions, 0 deletions
diff --git a/manual tests/4 standalone binaries/meson.build b/manual tests/4 standalone binaries/meson.build
new file mode 100644
index 0000000..ad6645f
--- /dev/null
+++ b/manual tests/4 standalone binaries/meson.build
@@ -0,0 +1,38 @@
+project('myapp', 'cpp')
+
+sdl = dependency('sdl2', required : host_machine.system() != 'windows')
+
+if meson.get_compiler('cpp').get_id() != 'msvc'
+ add_global_arguments('-std=c++11', language : 'cpp')
+endif
+
+if host_machine.system() == 'darwin'
+ install_data('myapp.sh',
+ install_dir : 'Contents/MacOS')
+
+ install_data('myapp.icns',
+ install_dir : 'Contents/Resources')
+
+ install_data('Info.plist',
+ install_dir : 'Contents')
+
+ meson.add_install_script('osx_bundler.sh')
+endif
+
+if host_machine.system() == 'linux'
+ install_data('myapp.sh', install_dir : '.')
+ meson.add_install_script('linux_bundler.sh')
+endif
+
+extra_link_args = []
+
+if host_machine.system() == 'windows'
+ str = '-I@0@/@1@'.format(meson.current_build_dir(), 'SDL2-2.0.3/include')
+ add_global_arguments(str, language : 'cpp')
+ extra_link_args = ['/SUBSYSTEM:CONSOLE', 'SDL2main.lib', 'SDL2.lib']
+endif
+
+prog = executable('myapp', 'myapp.cpp',
+dependencies : sdl,
+link_args : extra_link_args,
+install : true)