Skip to content

Commit 64f81a9

Browse files
committed
Corrected export headers workaround for Haiku.
1 parent 90a7fec commit 64f81a9

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,24 @@ file(WRITE "${PROJECT_BINARY_DIR}/VERSION" "${META_NAME_VERSION}")
120120
#
121121

122122
include(Portability)
123+
124+
#
125+
# Define Export Headers
126+
#
127+
123128
include(GenerateExportHeader)
124129

130+
# Workaround to enable Haiku with export headers
131+
# This can be removed once export headers support Haiku
132+
if(PROJECT_OS_HAIKU)
133+
function(GENERATE_EXPORT_HEADER)
134+
set(WIN32 1)
135+
# When the function is redefined, the old function can be accessed through underscore
136+
_GENERATE_EXPORT_HEADER(${ARGN})
137+
unset(WIN32)
138+
endfunction()
139+
endif()
140+
125141
#
126142
# Compiler settings and options
127143
#

cmake/Portability.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ if(PROJECT_OS_HAIKU)
6363
set(PROJECT_OS_NAME "Haiku")
6464
set(PROJECT_OS_FAMILY beos)
6565
add_compile_definitions(__HAIKU__)
66-
67-
# Workaround to enable Haiku with export headers
68-
set(WIN32 1)
69-
include(GenerateExportHeader)
70-
unset(WIN32)
7166
endif()
7267

7368
# Check Windows

0 commit comments

Comments
 (0)