Updated to work with latest changes upstream

actorid
Ardekantur 15 years ago
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,11 +11,23 @@ bool isFile(const char *name)
return (stat != 0xFFFFFFFF &&
(stat & FILE_ATTRIBUTE_DIRECTORY) == 0);
}
#endif // _WIN32
#elif __linux__ // Linux implementations
// Linux implementations
#ifdef __linux__
#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);
}
#elif __APPLE__ // Darwin implementations
#include <sys/stat.h>
#include <unistd.h>
@ -29,4 +41,4 @@ bool isFile(const char *name)
if(stat(name, &st)) return false;
return S_ISREG(st.st_mode);
}
#endif // __linux__
#endif

Loading…
Cancel
Save