mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
commit
11088100a0
@ -341,6 +341,9 @@ if(NOT WIN32 AND NOT APPLE_IOS)
|
||||
if(HAVE_RT_LIB)
|
||||
set(SYSTEM_LIBS ${SYSTEM_LIBS} rt)
|
||||
endif()
|
||||
if(HAIKU)
|
||||
set(SYSTEM_LIBS ${SYSTEM_LIBS} network)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_LUA)
|
||||
|
4
Global.h
4
Global.h
@ -41,6 +41,10 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size.");
|
||||
# define VCMI_UNIX
|
||||
# define VCMI_XDG
|
||||
# define VCMI_FREEBSD
|
||||
#elif defined(__HAIKU__)
|
||||
# define VCMI_UNIX
|
||||
# define VCMI_XDG
|
||||
# define VCMI_HAIKU
|
||||
#elif defined(__GNU__) || defined(__gnu_hurd__) || (defined(__MACH__) && !defined(__APPLE__))
|
||||
# define VCMI_UNIX
|
||||
# define VCMI_XDG
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#ifdef VCMI_WINDOWS
|
||||
#include <windows.h>
|
||||
#elif defined(VCMI_HAIKU)
|
||||
#include <OS.h>
|
||||
#elif !defined(VCMI_APPLE) && !defined(VCMI_FREEBSD) && !defined(VCMI_HURD)
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
@ -89,6 +91,8 @@ void setThreadName(const std::string &name)
|
||||
prctl(PR_SET_NAME, name.c_str(), 0, 0, 0);
|
||||
#elif defined(VCMI_APPLE)
|
||||
pthread_setname_np(name.c_str());
|
||||
#elif defined(VCMI_HAIKU)
|
||||
rename_thread(find_thread(NULL), name.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ else()
|
||||
set(server_LIBS vcmi)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES FreeBSD)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES FreeBSD OR HAIKU)
|
||||
set(server_LIBS execinfo ${server_LIBS})
|
||||
endif()
|
||||
target_link_libraries(vcmiserver PRIVATE ${server_LIBS} minizip::minizip)
|
||||
|
Loading…
Reference in New Issue
Block a user