mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-25 22:10:41 -04:00
Updated to work with latest changes upstream
This commit is contained in:
parent
1004ab7ea2
commit
a803c32733
@ -25,7 +25,7 @@ endif (WIN32)
|
||||
find_package(OGRE REQUIRED)
|
||||
find_package(BOOST REQUIRED)
|
||||
include_directories("." ${OGRE_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${PLATFORM_INCLUDE_DIR})
|
||||
link_directories(${OGRE_LIB_DIR})
|
||||
link_directories(${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR})
|
||||
|
||||
# Main executable
|
||||
add_executable(openmw ${BSA} ${TOOLS} ${OGRE} ${GAME})
|
||||
|
@ -14,12 +14,16 @@
|
||||
#include "../mangle/tools/str_exception.hpp"
|
||||
#include "../tools/stringops.hpp"
|
||||
|
||||
#ifdef __APPLE__
|
||||
// need our own implementation of strnlen
|
||||
static size_t strnlen(const char *s, size_t n)
|
||||
{
|
||||
const char *p = (const char *)memchr(s, 0, n);
|
||||
return(p ? p-s : n);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
namespace ESM {
|
||||
|
||||
enum Version
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Defines plugins to load
|
||||
|
||||
# Define plugin folder
|
||||
PluginFolder=/usr/local/lib/OGRE
|
||||
PluginFolder=/usr/local/lib/OGRE/
|
||||
|
||||
# Define plugins
|
||||
Plugin=RenderSystem_GL
|
||||
|
@ -11,10 +11,7 @@ bool isFile(const char *name)
|
||||
return (stat != 0xFFFFFFFF &&
|
||||
(stat & FILE_ATTRIBUTE_DIRECTORY) == 0);
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
// Linux implementations
|
||||
#ifdef __linux__
|
||||
#elif __linux__ // Linux implementations
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
@ -29,4 +26,19 @@ bool isFile(const char *name)
|
||||
if(stat(name, &st)) return false;
|
||||
return S_ISREG(st.st_mode);
|
||||
}
|
||||
#endif // __linux__
|
||||
|
||||
#elif __APPLE__ // Darwin implementations
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
bool isFile(const char *name)
|
||||
{
|
||||
// Does the file exist?
|
||||
if(access(name,0) != 0)
|
||||
return false;
|
||||
|
||||
struct stat st;
|
||||
if(stat(name, &st)) return false;
|
||||
return S_ISREG(st.st_mode);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user