Skip to content

Commit 90a7fec

Browse files
committed
Trying to simplify a bit the architecture in order to provide support for haiku.
1 parent e16232a commit 90a7fec

File tree

78 files changed

+601
-855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+601
-855
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
2929
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
3030
set(WriterCompilerDetectionHeaderFound NOTFOUND)
3131

32-
include(GenerateExportHeader)
3332
include(ExternalProject)
3433

3534
# This module is only available with CMake >=3.1, so check whether it could be found
@@ -121,6 +120,7 @@ file(WRITE "${PROJECT_BINARY_DIR}/VERSION" "${META_NAME_VERSION}")
121120
#
122121

123122
include(Portability)
123+
include(GenerateExportHeader)
124124

125125
#
126126
# Compiler settings and options

cmake/CompileOptions.cmake

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,8 @@ if (PROJECT_OS_FAMILY MATCHES "unix")
161161
add_compile_options(-Wreturn-stack-address)
162162
endif()
163163

164-
if(PROJECT_OS_LINUX)
165-
# Enable threads in linux
166-
add_compile_options(-pthread)
167-
endif()
168-
169164
if(PROJECT_OS_HAIKU)
170-
add_compile_options(-lpthread)
165+
add_compile_options(-fPIC)
171166
endif()
172167

173168
# All warnings that are not explicitly disabled are reported as errors
@@ -200,23 +195,19 @@ if (PROJECT_OS_FAMILY MATCHES "unix")
200195
endif()
201196
endif()
202197

203-
if(PROJECT_OS_FAMILY MATCHES "beos")
204-
if(PROJECT_OS_HAIKU)
205-
add_compile_options(-fPIC)
206-
endif()
207-
endif()
208-
209198
#
210199
# Linker options
211200
#
212201

213202
set(DEFAULT_LINKER_OPTIONS)
214203

215-
# Use pthreads on mingw and 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)
204+
if(APPLE OR PROJECT_OS_LINUX OR MINGW)
205+
# Enable threads in linux, macos and mingw
218206
set(DEFAULT_LINKER_OPTIONS
219207
-pthread
220208
)
221-
message(STATUS "-pthread enabled as compile flag")
209+
elseif(PROJECT_OS_HAIKU)
210+
set(DEFAULT_LINKER_OPTIONS
211+
-lpthread
212+
)
222213
endif()

0 commit comments

Comments
 (0)