mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-25 16:43:33 +00:00
Conditionally build cpp for platform, remove obsolete header
This commit is contained in:
parent
3d5f898920
commit
03302a8f5b
@ -337,12 +337,23 @@ add_component_dir(navmeshtool
|
|||||||
|
|
||||||
add_component_dir(platform
|
add_component_dir(platform
|
||||||
platform
|
platform
|
||||||
file.posix
|
|
||||||
file.win32
|
|
||||||
file.stdio
|
|
||||||
file
|
file
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
add_component_dir(platform
|
||||||
|
file.win32
|
||||||
|
)
|
||||||
|
elseif (UNIX)
|
||||||
|
add_component_dir(platform
|
||||||
|
file.posix
|
||||||
|
)
|
||||||
|
else ()
|
||||||
|
add_component_dir(platform
|
||||||
|
file.stdio
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#include "platform.internal.hpp"
|
|
||||||
#include "file.hpp"
|
#include "file.hpp"
|
||||||
|
|
||||||
#if PLATFORM_TYPE == PLATFORM_TYPE_POSIX
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -100,5 +97,3 @@ namespace Platform::File {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#include "platform.internal.hpp"
|
|
||||||
#include "file.hpp"
|
#include "file.hpp"
|
||||||
|
|
||||||
#if PLATFORM_TYPE == PLATFORM_TYPE_STDIO
|
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -89,5 +86,3 @@ namespace Platform::File {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#include "platform.internal.hpp"
|
|
||||||
#include "file.hpp"
|
#include "file.hpp"
|
||||||
|
|
||||||
#if PLATFORM_TYPE == PLATFORM_TYPE_WIN32
|
|
||||||
|
|
||||||
#include <components/windows.hpp>
|
#include <components/windows.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
@ -97,5 +94,3 @@ namespace Platform::File {
|
|||||||
return bytesRead;
|
return bytesRead;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
#ifndef COMPONENT_PLATFORM_FILE_HPP
|
|
||||||
#define COMPONENT_PLATFORM_FILE_HPP
|
|
||||||
|
|
||||||
namespace Platform
|
|
||||||
{
|
|
||||||
#define PLATFORM_TYPE_STDIO 0
|
|
||||||
#define PLATFORM_TYPE_WIN32 1
|
|
||||||
#define PLATFORM_TYPE_POSIX 2
|
|
||||||
|
|
||||||
#if defined(__linux) || defined(__unix) || defined(__posix)
|
|
||||||
#define PLATFORM_TYPE PLATFORM_TYPE_POSIX
|
|
||||||
#elif defined(_WIN32)
|
|
||||||
#define PLATFORM_TYPE PLATFORM_TYPE_WIN32
|
|
||||||
#else
|
|
||||||
#define PLATFORM_TYPE PLATFORM_TYPE_STDIO
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
x
Reference in New Issue
Block a user