Skip to content

Commit

Permalink
Initial Haiku port
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed Feb 28, 2024
1 parent 1962611 commit f4e3c7b
Show file tree
Hide file tree
Showing 4 changed files with 410 additions and 15 deletions.
28 changes: 16 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@ find_package(ZLIB REQUIRED)
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)

option(SCREENSHOT_BUILD "Build screenshotter build (Linux only)" FALSE)
if(LINUX)
option(SCREENSHOT_BUILD "Build screenshotter build (Linux only)" FALSE)
else()
set(SCREENSHOT_BUILD FALSE)
endif()

if(WIN32)
set(TMS_BACKEND "windows")
elseif(SCREENSHOT_BUILD)
set(TMS_BACKEND "screenshot-linux")
elseif(HAIKU)
set(TMS_BACKEND "haiku")
else()
if(SCREENSHOT_BUILD)
set(TMS_BACKEND "screenshot-linux")
else()
set(TMS_BACKEND "linux")
endif()
set(TMS_BACKEND "linux")
endif()

include_directories(
Expand Down Expand Up @@ -157,13 +161,13 @@ if(WIN32)
target_link_libraries(${PROJECT_NAME} ws2_32.lib version.lib shlwapi.lib winmm.lib)

set(COMMON_FLAGS "${COMMON_FLAGS} -DTMS_BACKEND_WINDOWS -D_WIN32_WINNT=0x0501 -Dsrandom=srand -Drandom=rand -DUNICODE")
elseif(SCREENSHOT_BUILD)
# Screenshot build doesn't use GLEW
set(COMMON_FLAGS "${COMMON_FLAGS} -DGL_GLEXT_PROTOTYPES -DNO_UI -DTMS_BACKEND_LINUX_SS")
elseif(HAIKU)
set(COMMON_FLAGS "${COMMON_FLAGS} -DTMS_BACKEND_HAIKU")
else()
if(SCREENSHOT_BUILD)
# Screenshot build doesn't use GLEW
set(COMMON_FLAGS "${COMMON_FLAGS} -DGL_GLEXT_PROTOTYPES -DNO_UI -DTMS_BACKEND_LINUX_SS")
else()
set(COMMON_FLAGS "${COMMON_FLAGS} -DTMS_BACKEND_LINUX")
endif()
set(COMMON_FLAGS "${COMMON_FLAGS} -DTMS_BACKEND_LINUX")
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
Expand Down
Loading

0 comments on commit f4e3c7b

Please sign in to comment.