@@ -11,14 +11,18 @@ namespace Wixl {
11
11
[CCode (array_length = false , array_null_terminated = true )]
12
12
static string[] defines;
13
13
[CCode (array_length = false , array_null_terminated = true )]
14
+ static string[] opt_includedirs;
15
+
14
16
static string [] includedirs;
17
+ static string wxidir;
15
18
16
19
private const OptionEntry [] options = {
17
20
{ " version" , 0 , 0 , OptionArg . NONE , ref version, N_ (" Display version number" ), null },
18
21
{ " verbose" , ' v' , 0 , OptionArg . NONE , ref verbose, N_ (" Verbose output" ), null },
19
22
{ " output" , ' o' , 0 , OptionArg . FILENAME , ref output, N_ (" Output file" ), null },
20
23
{ " define" , ' D' , 0 , OptionArg . STRING_ARRAY , ref defines, N_ (" Define variable" ), null },
21
- { " includedir" , ' I' , 0 , OptionArg . STRING_ARRAY , ref includedirs, N_ (" Include directory" ), null },
24
+ { " includedir" , ' I' , 0 , OptionArg . STRING_ARRAY , ref opt_includedirs, N_ (" Include directory" ), null },
25
+ { " wxidir" , 0 , 0 , OptionArg . STRING , ref wxidir, N_ (" System include directory" ), null },
22
26
{ " only-preproc" , ' E' , 0 , OptionArg . NONE , ref preproc, N_ (" Stop after the preprocessing stage" ), null },
23
27
{ " " , 0 , 0 , OptionArg . FILENAME_ARRAY , ref files, null , N_ (" INPUT_FILE..." ) },
24
28
{ null }
@@ -35,6 +39,8 @@ namespace Wixl {
35
39
opt_context. set_help_enabled (true );
36
40
opt_context. add_main_entries (options, null );
37
41
42
+ wxidir = Config . PKGDATADIR + " /include" ;
43
+
38
44
try {
39
45
opt_context. parse (ref args);
40
46
} catch (OptionError . BAD_VALUE err) {
@@ -44,6 +50,10 @@ namespace Wixl {
44
50
warning (error. message);
45
51
}
46
52
53
+ /* fixme vala, does not support += on arrays without length. */
54
+ includedirs = opt_includedirs;
55
+ includedirs + = wxidir;
56
+
47
57
if (version) {
48
58
GLib . stdout. printf (" %s\n " , Config . PACKAGE_VERSION );
49
59
exit (0 );
0 commit comments