Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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" )
Expand Down
6 changes: 5 additions & 1 deletion libraries/ZVulkan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 5 additions & 1 deletion libraries/ZWidget/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion source/common/engine/i_specialpaths.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion source/common/platform/posix/unix/i_specialpaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion source/common/rendering/gl_load/gl_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions source/core/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down