mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-09 23:40:53 +00:00
Haiku patch for Raze
This commit is contained in:
parent
940e53af6f
commit
cb322b563d
7 changed files with 21 additions and 7 deletions
|
@ -321,7 +321,7 @@ else()
|
||||||
|
|
||||||
if ( UNIX )
|
if ( UNIX )
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
check_symbol_exists( "fts_set" "fts.h" HAVE_FTS )
|
check_symbol_exists( "fts_set" "sys/types.h;sys/stat.h;fts.h" HAVE_FTS )
|
||||||
if ( NOT HAVE_FTS )
|
if ( NOT HAVE_FTS )
|
||||||
include ( FindPkgConfig )
|
include ( FindPkgConfig )
|
||||||
pkg_check_modules( MUSL_FTS musl-fts )
|
pkg_check_modules( MUSL_FTS musl-fts )
|
||||||
|
@ -343,7 +343,7 @@ else()
|
||||||
# If we're compiling with a custom GCC on the Mac (which we know since g++-4.2 doesn't support C++11) statically link libgcc.
|
# If we're compiling with a custom GCC on the Mac (which we know since g++-4.2 doesn't support C++11) statically link libgcc.
|
||||||
set( ALL_C_FLAGS "-static-libgcc" )
|
set( ALL_C_FLAGS "-static-libgcc" )
|
||||||
endif()
|
endif()
|
||||||
elseif( NOT MINGW )
|
elseif( NOT MINGW AND NOT HAIKU )
|
||||||
# Generic GCC/Clang requires position independent executable to be enabled explicitly
|
# Generic GCC/Clang requires position independent executable to be enabled explicitly
|
||||||
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" )
|
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" )
|
||||||
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" )
|
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" )
|
||||||
|
|
|
@ -188,7 +188,11 @@ if(WIN32)
|
||||||
add_definitions(-DUNICODE -D_UNICODE)
|
add_definitions(-DUNICODE -D_UNICODE)
|
||||||
else()
|
else()
|
||||||
set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
|
set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
|
||||||
set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
|
if(NOT HAIKU)
|
||||||
|
set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
|
||||||
|
else()
|
||||||
|
set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
|
||||||
|
endif()
|
||||||
add_definitions(-DUNIX -D_UNIX)
|
add_definitions(-DUNIX -D_UNIX)
|
||||||
add_link_options(-pthread)
|
add_link_options(-pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -130,7 +130,11 @@ elseif(APPLE)
|
||||||
add_link_options(-pthread)
|
add_link_options(-pthread)
|
||||||
else()
|
else()
|
||||||
set(ZWIDGET_SOURCES ${ZWIDGET_SOURCES} ${ZWIDGET_SDL2_SOURCES})
|
set(ZWIDGET_SOURCES ${ZWIDGET_SOURCES} ${ZWIDGET_SDL2_SOURCES})
|
||||||
set(ZWIDGET_LIBS ${CMAKE_DL_LIBS} -ldl)
|
if(NOT HAIKU)
|
||||||
|
set(ZWIDGET_LIBS ${CMAKE_DL_LIBS} -ldl)
|
||||||
|
else()
|
||||||
|
set(ZWIDGET_LIBS ${CMAKE_DL_LIBS})
|
||||||
|
endif()
|
||||||
add_definitions(-DUNIX -D_UNIX)
|
add_definitions(-DUNIX -D_UNIX)
|
||||||
add_link_options(-pthread)
|
add_link_options(-pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "zstring.h"
|
#include "zstring.h"
|
||||||
|
|
||||||
#ifdef __unix__
|
#if defined(__unix__) || defined(__HAIKU__)
|
||||||
FString GetUserFile (const char *path);
|
FString GetUserFile (const char *path);
|
||||||
#endif
|
#endif
|
||||||
FString M_GetAppDataPath(bool create);
|
FString M_GetAppDataPath(bool create);
|
||||||
|
|
|
@ -112,7 +112,11 @@ FString M_GetAppDataPath(bool create)
|
||||||
{
|
{
|
||||||
// Don't use GAME_DIR and such so that ZDoom and its child ports can
|
// Don't use GAME_DIR and such so that ZDoom and its child ports can
|
||||||
// share the node cache.
|
// share the node cache.
|
||||||
FString path = NicePath("$HOME/.config/" GAMENAMELOWERCASE);
|
#if defined(__HAIKU__)
|
||||||
|
FString path = NicePath("$HOME/config/settings/" GAMENAME);
|
||||||
|
#else
|
||||||
|
FString path = NicePath("$HOME/.config/" GAMENAMELOWERCASE);
|
||||||
|
#endif
|
||||||
if (create)
|
if (create)
|
||||||
{
|
{
|
||||||
CreatePath(path.GetChars());
|
CreatePath(path.GetChars());
|
||||||
|
|
|
@ -134,7 +134,7 @@ static PROC WinGetProcAddress(const char *name)
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
|
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
|
||||||
#else
|
#else
|
||||||
#if defined(__sgi) || defined(__sun) || defined(__unix__)
|
#if defined(__sgi) || defined(__sun) || defined(__unix__) || defined(__HAIKU__)
|
||||||
void* SDL_GL_GetProcAddress(const char* proc);
|
void* SDL_GL_GetProcAddress(const char* proc);
|
||||||
#define IntGetProcAddress(name) SDL_GL_GetProcAddress((const char*)name)
|
#define IntGetProcAddress(name) SDL_GL_GetProcAddress((const char*)name)
|
||||||
//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
|
//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
|
||||||
|
|
|
@ -86,6 +86,8 @@ const char *GetVersionString();
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(_WIN32)
|
#if defined(__APPLE__) || defined(_WIN32)
|
||||||
#define GAME_DIR GAMENAMELOWERCASE
|
#define GAME_DIR GAMENAMELOWERCASE
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
#define GAME_DIR "config/settings/" GAMENAME
|
||||||
#else
|
#else
|
||||||
#define GAME_DIR ".config/" GAMENAMELOWERCASE
|
#define GAME_DIR ".config/" GAMENAMELOWERCASE
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue