mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-09 15:31:03 +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 )
|
||||
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 )
|
||||
include ( FindPkgConfig )
|
||||
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.
|
||||
set( ALL_C_FLAGS "-static-libgcc" )
|
||||
endif()
|
||||
elseif( NOT MINGW )
|
||||
elseif( NOT MINGW AND NOT HAIKU )
|
||||
# Generic GCC/Clang requires position independent executable to be enabled explicitly
|
||||
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" )
|
||||
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" )
|
||||
|
|
|
@ -188,7 +188,11 @@ if(WIN32)
|
|||
add_definitions(-DUNICODE -D_UNICODE)
|
||||
else()
|
||||
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_link_options(-pthread)
|
||||
endif()
|
||||
|
|
|
@ -130,7 +130,11 @@ elseif(APPLE)
|
|||
add_link_options(-pthread)
|
||||
else()
|
||||
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_link_options(-pthread)
|
||||
endif()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "zstring.h"
|
||||
|
||||
#ifdef __unix__
|
||||
#if defined(__unix__) || defined(__HAIKU__)
|
||||
FString GetUserFile (const char *path);
|
||||
#endif
|
||||
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
|
||||
// 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)
|
||||
{
|
||||
CreatePath(path.GetChars());
|
||||
|
|
|
@ -134,7 +134,7 @@ static PROC WinGetProcAddress(const char *name)
|
|||
#if defined(__APPLE__)
|
||||
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
|
||||
#else
|
||||
#if defined(__sgi) || defined(__sun) || defined(__unix__)
|
||||
#if defined(__sgi) || defined(__sun) || defined(__unix__) || defined(__HAIKU__)
|
||||
void* SDL_GL_GetProcAddress(const char* proc);
|
||||
#define IntGetProcAddress(name) SDL_GL_GetProcAddress((const char*)name)
|
||||
//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
|
||||
|
|
|
@ -86,6 +86,8 @@ const char *GetVersionString();
|
|||
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
#define GAME_DIR GAMENAMELOWERCASE
|
||||
#elif defined(__HAIKU__)
|
||||
#define GAME_DIR "config/settings/" GAMENAME
|
||||
#else
|
||||
#define GAME_DIR ".config/" GAMENAMELOWERCASE
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue