Skip to content

Commit e16232a

Browse files
authored
Merge pull request #73 from Duckxz/develop
Haiku port base
2 parents d4b2fa2 + 8761daa commit e16232a

File tree

12 files changed

+686
-17
lines changed

12 files changed

+686
-17
lines changed

cmake/CompileOptions.cmake

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ string(TOUPPER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME_UPPER)
1313

1414
# Determine architecture (32/64 bit)
1515
set(X64 OFF)
16+
1617
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
1718
set(X64 ON)
1819
endif()
@@ -165,6 +166,10 @@ if (PROJECT_OS_FAMILY MATCHES "unix")
165166
add_compile_options(-pthread)
166167
endif()
167168

169+
if(PROJECT_OS_HAIKU)
170+
add_compile_options(-lpthread)
171+
endif()
172+
168173
# All warnings that are not explicitly disabled are reported as errors
169174
#add_compile_options(-Werror)
170175
add_compile_options(-Wall)
@@ -195,15 +200,23 @@ if (PROJECT_OS_FAMILY MATCHES "unix")
195200
endif()
196201
endif()
197202

203+
if(PROJECT_OS_FAMILY MATCHES "beos")
204+
if(PROJECT_OS_HAIKU)
205+
add_compile_options(-fPIC)
206+
endif()
207+
endif()
208+
198209
#
199210
# Linker options
200211
#
201212

202213
set(DEFAULT_LINKER_OPTIONS)
203214

204215
# Use pthreads on mingw and linux
205-
if(("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
216+
# if(("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
217+
if(MINGW)
206218
set(DEFAULT_LINKER_OPTIONS
207219
-pthread
208220
)
221+
message(STATUS "-pthread enabled as compile flag")
209222
endif()

0 commit comments

Comments
 (0)