[libhandy/msvc: 26/26] demo app: Fix linking on Visual Studio-style builds
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/msvc: 26/26] demo app: Fix linking on Visual Studio-style builds
- Date: Fri, 21 Jan 2022 09:51:35 +0000 (UTC)
commit c59a5032096efec5de7fd558d81f7fbbca09cbaa
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jan 19 18:06:06 2022 +0800
demo app: Fix linking on Visual Studio-style builds
We must pass in '/entry:mainCRTStartup' so that things will link when
building GTK-based apps with 'gui_app: true' (i.e. '/subsystem:windows'
for Visual Studio builds).
examples/meson.build | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/examples/meson.build b/examples/meson.build
index 7205c3d1..908c54ef 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -18,9 +18,16 @@ handy_demo_sources = [
libhandy_generated_headers,
]
+demo_link_args = []
+
+if cc.get_argument_syntax() == 'msvc'
+ demo_link_args += '/entry:mainCRTStartup'
+endif
+
handy_demo = executable('handy-@0@-demo'.format(apiversion),
handy_demo_sources,
dependencies: libhandy_dep,
+ link_args: demo_link_args,
gui_app: true,
install: true,
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]