summaryrefslogtreecommitdiff
path: root/test cases/windows
diff options
context:
space:
mode:
authorPeter Harris <peter@harr.ca>2025-05-12 16:52:33 -0400
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-05-26 22:33:53 +0300
commit6447eb00d87f439147249dd593635ae14e56d0dd (patch)
treef388d5b1ea2e2b9721a87cb51ea2802d900ff8a4 /test cases/windows
parent32068a59f5e30862c61ebc2bcd4d2373694e1c96 (diff)
downloadmeson-6447eb00d87f439147249dd593635ae14e56d0dd.tar.gz
vs2010backend: fix EmbedManifest state when /MANIFEST:EMBED is used
With introduction of dfd8cfbd8d9c VS compile is broken for cases where /MANIFEST:EMBED linker flag is actually used. The fix keeps the default creation of <EmbedManifest> but adopts the same strategy as e3db7af0ea41, that is to scan the link flags for the embed case to decide state is emit 'true' or 'false' for EmbedManifest.
Diffstat (limited to 'test cases/windows')
-rw-r--r--test cases/windows/25 embed manifest/DPIAware.manifest9
-rw-r--r--test cases/windows/25 embed manifest/meson.build11
-rw-r--r--test cases/windows/25 embed manifest/prog.c3
3 files changed, 23 insertions, 0 deletions
diff --git a/test cases/windows/25 embed manifest/DPIAware.manifest b/test cases/windows/25 embed manifest/DPIAware.manifest
new file mode 100644
index 000000000..f2708ecb1
--- /dev/null
+++ b/test cases/windows/25 embed manifest/DPIAware.manifest
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <asmv3:application>
+ <asmv3:windowsSettings>
+ <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
+ <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
+ </asmv3:windowsSettings>
+ </asmv3:application>
+</assembly>
diff --git a/test cases/windows/25 embed manifest/meson.build b/test cases/windows/25 embed manifest/meson.build
new file mode 100644
index 000000000..0f4c9b43f
--- /dev/null
+++ b/test cases/windows/25 embed manifest/meson.build
@@ -0,0 +1,11 @@
+project('can-manifests-be-embedded', 'c')
+
+cc = meson.get_compiler('c')
+
+if cc.get_linker_id() not in ['link', 'lld-link', 'xilink'] # cc.get_linker_argument_syntax() != 'link'
+ error('MESON_SKIP_TEST: test is only relevant for the Microsoft linker')
+endif
+
+# Ensure that the manifest can be embedded
+executable('prog', 'prog.c',
+ link_args: ['/MANIFEST:EMBED', '/MANIFESTINPUT:' + meson.project_source_root() / 'DPIAware.manifest'])
diff --git a/test cases/windows/25 embed manifest/prog.c b/test cases/windows/25 embed manifest/prog.c
new file mode 100644
index 000000000..b1d9c2ce4
--- /dev/null
+++ b/test cases/windows/25 embed manifest/prog.c
@@ -0,0 +1,3 @@
+int main(int argc, char *argv[]) {
+ return 0;
+}