Added CMake build system (to facilitate Win64 builds)

Win32 build and tests work under CMake, however I haven't added
install code yet. Win64 build fails due to chkstk.S failing to
assemble.
This commit is contained in:
James Lyon
2013-04-21 11:20:20 +01:00
parent 05fa2e754b
commit 8a81f9e103
5 changed files with 254 additions and 4 deletions

View File

@ -80,12 +80,19 @@ ST_FUNC void asm_global_instr(void)
/********************************************************/
#ifdef _WIN32
// GCC appears to use '/' for relative paths and '\\' for absolute paths on Windows
static char *normalize_slashes(char *path)
{
char *p;
for (p = path; *p; ++p)
if (*p == '\\')
*p = '/';
if (path[1] == ':') {
for (p = path+2; *p; ++p)
if (*p == '/')
*p = '\\';
} else {
for (p = path; *p; ++p)
if (*p == '\\')
*p = '/';
}
return path;
}