diff options
author | miqlas <miqlas@users.noreply.github.com> | 2017-10-30 08:17:43 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-10-30 08:17:43 +0100 |
commit | a95e0d18762c8182a3c2ba074b5961d5c00a90a4 (patch) | |
tree | 2aabd4b3491389d337d8402489c556b9821343f5 /src/CMakeLists.txt | |
parent | cd1140f69cf31c6c3885dd81c64e505ac1559487 (diff) | |
download | minetest-a95e0d18762c8182a3c2ba074b5961d5c00a90a4.tar.gz minetest-a95e0d18762c8182a3c2ba074b5961d5c00a90a4.tar.bz2 minetest-a95e0d18762c8182a3c2ba074b5961d5c00a90a4.zip |
Initial Haiku support (#6568)
* Iitial Haiku support
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f836a9f66..82f60be86 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -252,6 +252,12 @@ if(NOT MSVC) set(USE_GPROF FALSE CACHE BOOL "Use -pg flag for g++") endif() +# Haiku endian support +if(HAIKU) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_BSD_SOURCE") +endif() + # Use cmake_config.h add_definitions(-DUSE_CMAKE_CONFIG_H) @@ -300,7 +306,9 @@ if(WIN32) else() # Unix probably if(BUILD_CLIENT) - find_package(X11 REQUIRED) + if(NOT HAIKU) + find_package(X11 REQUIRED) + endif(NOT HAIKU) find_package(OpenGL REQUIRED) find_package(JPEG REQUIRED) find_package(BZip2 REQUIRED) @@ -328,10 +336,12 @@ else() endif(HAVE_LIBRT) endif(APPLE) + if(NOT HAIKU) # This way Xxf86vm is found on OpenBSD too - find_library(XXF86VM_LIBRARY Xxf86vm) - mark_as_advanced(XXF86VM_LIBRARY) - set(CLIENT_PLATFORM_LIBS ${CLIENT_PLATFORM_LIBS} ${XXF86VM_LIBRARY}) + find_library(XXF86VM_LIBRARY Xxf86vm) + mark_as_advanced(XXF86VM_LIBRARY) + set(CLIENT_PLATFORM_LIBS ${CLIENT_PLATFORM_LIBS} ${XXF86VM_LIBRARY}) + endif(NOT HAIKU) # Prefer local iconv if installed find_library(ICONV_LIBRARY iconv) |