summaryrefslogtreecommitdiffstats
path: root/test cases/windows/12 resources with custom targets/res
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 /test cases/windows/12 resources with custom targets/res
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/windows/12 resources with custom targets/res')
-rwxr-xr-xtest cases/windows/12 resources with custom targets/res/gen-res.py6
-rw-r--r--test cases/windows/12 resources with custom targets/res/meson.build19
-rw-r--r--test cases/windows/12 resources with custom targets/res/myres.rc.in4
-rw-r--r--test cases/windows/12 resources with custom targets/res/myres_static.rc3
-rw-r--r--test cases/windows/12 resources with custom targets/res/resource.h0
-rw-r--r--test cases/windows/12 resources with custom targets/res/sample.icobin0 -> 9662 bytes
6 files changed, 32 insertions, 0 deletions
diff --git a/test cases/windows/12 resources with custom targets/res/gen-res.py b/test cases/windows/12 resources with custom targets/res/gen-res.py
new file mode 100755
index 0000000..e5ef6b1
--- /dev/null
+++ b/test cases/windows/12 resources with custom targets/res/gen-res.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python3
+
+import sys
+
+with open(sys.argv[1]) as infile, open(sys.argv[2], 'w') as outfile:
+ outfile.write(infile.read().format(icon=sys.argv[3]))
diff --git a/test cases/windows/12 resources with custom targets/res/meson.build b/test cases/windows/12 resources with custom targets/res/meson.build
new file mode 100644
index 0000000..9797637
--- /dev/null
+++ b/test cases/windows/12 resources with custom targets/res/meson.build
@@ -0,0 +1,19 @@
+win = import('windows')
+
+rc_writer = find_program('./gen-res.py')
+
+rc_sources = []
+
+foreach id : [1, 2]
+ rc_sources += custom_target('RC source file @0@'.format(id),
+ input : 'myres.rc.in',
+ output : 'myres_@0@.rc'.format(id),
+ command : [rc_writer, '@INPUT@', '@OUTPUT@', files('sample.ico')],
+ install : false,
+ build_always : false)
+endforeach
+
+rc_sources += files('myres_static.rc')
+
+res = win.compile_resources(rc_sources,
+ include_directories: include_directories('.'))
diff --git a/test cases/windows/12 resources with custom targets/res/myres.rc.in b/test cases/windows/12 resources with custom targets/res/myres.rc.in
new file mode 100644
index 0000000..0cff642
--- /dev/null
+++ b/test cases/windows/12 resources with custom targets/res/myres.rc.in
@@ -0,0 +1,4 @@
+#include<windows.h>
+#include<resource.h>
+
+1 ICON "{icon}"
diff --git a/test cases/windows/12 resources with custom targets/res/myres_static.rc b/test cases/windows/12 resources with custom targets/res/myres_static.rc
new file mode 100644
index 0000000..12838ae
--- /dev/null
+++ b/test cases/windows/12 resources with custom targets/res/myres_static.rc
@@ -0,0 +1,3 @@
+#include<windows.h>
+
+1 ICON "sample.ico"
diff --git a/test cases/windows/12 resources with custom targets/res/resource.h b/test cases/windows/12 resources with custom targets/res/resource.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/windows/12 resources with custom targets/res/resource.h
diff --git a/test cases/windows/12 resources with custom targets/res/sample.ico b/test cases/windows/12 resources with custom targets/res/sample.ico
new file mode 100644
index 0000000..24bd3d9
--- /dev/null
+++ b/test cases/windows/12 resources with custom targets/res/sample.ico
Binary files differ