endif
if build_machine.system() == 'windows' or build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
- inc += include_directories(get_option('prefix') / 'include')
- argplib = cc.find_library('argp', dirs : get_option('prefix') / 'lib')
+ inc += include_directories(join_paths([get_option('prefix'), 'include']))
+ argplib = cc.find_library('argp', dirs : join_paths([get_option('prefix'), 'lib']))
else
- argplib = dependency('', required : false)
+ argplib = dependency('', required : false)
endif
subdir('include')
#include <stdio.h>
-#include <windows.h>
+// note this is not a proper basename implementation
char* basename(char* path)
{
- // note this is not a proper basename implementation
char *p = strrchr (path, '\\');
if (p == NULL)
{
p = strrchr(path, '/');
}
return p ? p + 1 : (char *) path;
-
- // char full_path[MAX_PATH], drive[MAX_PATH], dir[MAX_PATH], filename[MAX_PATH], ext[MAX_PATH];
-
- // printf("Input: %s", path);
-
- // _fullpath(full_path, path, MAX_PATH);
- // printf("Input: %s", full_path);
-
- // _splitpath(full_path, drive, dir, filename, ext);
-
- // printf("%s, %s, %s, %s", drive, dir, filename, ext);
-
- // const char* res = malloc(MAX_PATH);
- // sprintf(res, "%s%s", filename, ext);
- // printf("Result: %s", res);
-
- // return res;
}
\ No newline at end of file