diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/windows/12 resources with custom targets/res | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/windows/12 resources with custom targets/res')
6 files changed, 32 insertions, 0 deletions
diff --git a/meson/test cases/windows/12 resources with custom targets/res/gen-res.py b/meson/test cases/windows/12 resources with custom targets/res/gen-res.py new file mode 100755 index 000000000..e5ef6b108 --- /dev/null +++ b/meson/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/meson/test cases/windows/12 resources with custom targets/res/meson.build b/meson/test cases/windows/12 resources with custom targets/res/meson.build new file mode 100644 index 000000000..97976370b --- /dev/null +++ b/meson/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/meson/test cases/windows/12 resources with custom targets/res/myres.rc.in b/meson/test cases/windows/12 resources with custom targets/res/myres.rc.in new file mode 100644 index 000000000..0cff642ba --- /dev/null +++ b/meson/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/meson/test cases/windows/12 resources with custom targets/res/myres_static.rc b/meson/test cases/windows/12 resources with custom targets/res/myres_static.rc new file mode 100644 index 000000000..12838aee2 --- /dev/null +++ b/meson/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/meson/test cases/windows/12 resources with custom targets/res/resource.h b/meson/test cases/windows/12 resources with custom targets/res/resource.h new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/meson/test cases/windows/12 resources with custom targets/res/resource.h diff --git a/meson/test cases/windows/12 resources with custom targets/res/sample.ico b/meson/test cases/windows/12 resources with custom targets/res/sample.ico Binary files differnew file mode 100644 index 000000000..24bd3d9e9 --- /dev/null +++ b/meson/test cases/windows/12 resources with custom targets/res/sample.ico |