mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 16:09:43 +00:00
Conditionally build cpp for platform, remove obsolete header
This commit is contained in:
parent
3d5f898920
commit
03302a8f5b
5 changed files with 14 additions and 37 deletions
|
@ -337,12 +337,23 @@ add_component_dir(navmeshtool
|
|||
|
||||
add_component_dir(platform
|
||||
platform
|
||||
file.posix
|
||||
file.win32
|
||||
file.stdio
|
||||
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
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#include "platform.internal.hpp"
|
||||
#include "file.hpp"
|
||||
|
||||
#if PLATFORM_TYPE == PLATFORM_TYPE_POSIX
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -100,5 +97,3 @@ namespace Platform::File {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#include "platform.internal.hpp"
|
||||
#include "file.hpp"
|
||||
|
||||
#if PLATFORM_TYPE == PLATFORM_TYPE_STDIO
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
@ -89,5 +86,3 @@ namespace Platform::File {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#include "platform.internal.hpp"
|
||||
#include "file.hpp"
|
||||
|
||||
#if PLATFORM_TYPE == PLATFORM_TYPE_WIN32
|
||||
|
||||
#include <components/windows.hpp>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
@ -97,5 +94,3 @@ namespace Platform::File {
|
|||
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…
Reference in a new issue