Skip to content

Commit 5497d1e

Browse files
committed
Add Haiku support to premake5.lua
Note we want x86 build by default. Only gcc>2 build works for some reason, I suppose premake doesn't care about gcc2 and uses incompatible args, but we do.
1 parent c458e21 commit 5497d1e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

build/premake5.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ workspace "NativeFileDialog"
3737
platforms {"x64"}
3838
filter "system:windows or system:linux"
3939
platforms {"x64", "x86"}
40+
filter "system:haiku"
41+
platforms {"x86", "x64"}
4042

4143

4244
objdir(path.join(build_dir, "obj/"))
@@ -84,6 +86,9 @@ workspace "NativeFileDialog"
8486
language "C"
8587
files {root_dir.."src/nfd_cocoa.m"}
8688

89+
filter "system:haiku"
90+
language "C++"
91+
files {root_dir.."src/nfd_haiku.cpp"}
8792

8893

8994
filter {"system:linux", "options:linux_backend=gtk3"}
@@ -136,6 +141,10 @@ local make_test = function(name)
136141
filter {"system:macosx"}
137142
links {"Foundation.framework", "AppKit.framework"}
138143

144+
filter {"system:haiku"}
145+
-- should link to stdc++.r4 for gcc2
146+
links {"be", "tracker", "stdc++"}
147+
139148
filter {"configurations:Debug", "system:linux", "options:linux_backend=gtk3"}
140149
linkoptions {"-lnfd_d `pkg-config --libs gtk+-3.0`"}
141150
filter {"configurations:Debug", "system:linux", "options:linux_backend=zenity"}
@@ -193,6 +202,7 @@ newaction
193202
premake_do_action("gmake", "linux", true,{})
194203
premake_do_action("gmake", "linux", true,{linux_backend='zenity'})
195204
premake_do_action("gmake", "macosx", true,{})
205+
premake_do_action("gmake", "haiku", true,{})
196206
premake_do_action("gmake", "windows", true,{})
197207
end
198208
}
@@ -238,6 +248,7 @@ newaction
238248
"xcode4",
239249
"gmake_linux",
240250
"gmake_macosx",
251+
"gmake_haiku",
241252
"gmake_windows"
242253
}
243254

0 commit comments

Comments
 (0)