forked from libxmlplusplus/libxmlplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Meson builds: Embed UAC manifest for dom_update_namespace
...when a 32-bit Windows build is being carried out. Otherwise, if we run the tests, this test program will fail to run as any 32-bit Windows executable with 'update' in its filename will trigger an UAC prompt, causing it to fail to run when 'ninja test' is invoked.
- Loading branch information
Showing
2 changed files
with
43 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,49 @@ | ||
# examples | ||
|
||
# Input: xmlxx_own_dep, build_examples | ||
# Input: meson, xmlxx_own_dep, build_examples, generate_uac_manifest_py | ||
# Output: - | ||
|
||
# Generate the manifest file to embed for 32-bit builds for tests to run | ||
# (on 32-bit Windows, execucatables that have 'update' in their filenames | ||
# are considered to trigger UAC, which will get into our way) | ||
|
||
dom_update_namespace_extra_objs = [] | ||
if host_machine.system() == 'windows' and host_machine.cpu_family() == 'x86' | ||
uac_exe_pkg = 'libxml++' | ||
uac_exe_name = 'dom_update_namespace' | ||
dom_update_namespace_rc = custom_target( | ||
'@[email protected]'.format(uac_exe_name), | ||
output: '@[email protected]'.format(uac_exe_name), | ||
command: [generate_uac_manifest_py, | ||
'-p=@0@'.format(uac_exe_pkg), | ||
'-n=@0@'.format(uac_exe_name), | ||
'--pkg-version=@0@'.format(meson.project_version()), | ||
'--output-dir=@OUTDIR@'], | ||
) | ||
dom_update_namespace_extra_objs += import('windows').compile_resources(dom_update_namespace_rc) | ||
endif | ||
|
||
|
||
example_programs = [ | ||
# [[dir-name], exe-name, [sources], [arguments]] | ||
[['dom_build'], 'example', ['main.cc'], []], | ||
[['dom_parse_entities'], 'example', ['main.cc'], []], | ||
[['dom_parser'], 'example', ['main.cc'], []], | ||
[['dom_parser_raw'], 'example', ['main.cc'], []], | ||
# [[dir-name], exe-name, [sources], [arguments], [extra_objs]] | ||
[['dom_build'], 'example', ['main.cc'], [], []], | ||
[['dom_parse_entities'], 'example', ['main.cc'], [], []], | ||
[['dom_parser'], 'example', ['main.cc'], [], []], | ||
[['dom_parser_raw'], 'example', ['main.cc'], [], []], | ||
[['dom_read_write'], 'example', ['main.cc'], | ||
['example.xml', meson.current_build_dir() / 'dom_read_write_example_output.xml']], | ||
[['dom_update_namespace'], 'example', ['main.cc'], []], | ||
[['dom_xinclude'], 'example', ['main.cc'], []], | ||
[['dom_xpath'], 'example', ['main.cc'], []], | ||
[['dtdvalidation'], 'example', ['main.cc'], []], | ||
[['import_node'], 'example', ['main.cc'], []], | ||
[['sax_exception'], 'example', ['main.cc', 'myparser.cc'], []], | ||
[['sax_parser'], 'example', ['main.cc', 'myparser.cc'], []], | ||
['example.xml', meson.current_build_dir() / 'dom_read_write_example_output.xml'], []], | ||
[['dom_update_namespace'], 'example', ['main.cc'], [], dom_update_namespace_extra_objs], | ||
[['dom_xinclude'], 'example', ['main.cc'], [], []], | ||
[['dom_xpath'], 'example', ['main.cc'], [], []], | ||
[['dtdvalidation'], 'example', ['main.cc'], [], []], | ||
[['import_node'], 'example', ['main.cc'], [], []], | ||
[['sax_exception'], 'example', ['main.cc', 'myparser.cc'], [], []], | ||
[['sax_parser'], 'example', ['main.cc', 'myparser.cc'], [], []], | ||
[['sax_parser_build_dom'], 'example', ['main.cc', 'svgparser.cc', | ||
'svgdocument.cc', 'svgelement.cc'], []], | ||
[['sax_parser_entities'], 'example', ['main.cc', 'myparser.cc'], []], | ||
[['schemavalidation'], 'example', ['main.cc'], []], | ||
[['textreader'], 'example', ['main.cc'], []], | ||
'svgdocument.cc', 'svgelement.cc'], [], []], | ||
[['sax_parser_entities'], 'example', ['main.cc', 'myparser.cc'], [], []], | ||
[['schemavalidation'], 'example', ['main.cc'], [], []], | ||
[['textreader'], 'example', ['main.cc'], [], []], | ||
] | ||
|
||
foreach ex : example_programs | ||
|
@@ -35,6 +56,9 @@ foreach ex : example_programs | |
foreach src : ex[2] | ||
ex_sources += dir / src | ||
endforeach | ||
foreach obj : ex[4] | ||
ex_sources += obj | ||
endforeach | ||
|
||
exe_file = executable(ex_name, ex_sources, | ||
dependencies: xmlxx_own_dep, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters