Skip to content

Commit da1f994

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 0a49bab commit da1f994

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
@@ -53,6 +53,8 @@ workspace "NativeFileDialog"
5353
platforms {"x64", "x86"}
5454
filter "system:linux or system:macosx"
5555
platforms {"arm64"}
56+
filter "system:haiku"
57+
platforms {"x86", "x64"}
5658

5759
objdir(path.join(build_dir, "obj/"))
5860

@@ -105,6 +107,9 @@ workspace "NativeFileDialog"
105107
language "C"
106108
files {root_dir.."src/nfd_cocoa.m"}
107109

110+
filter "system:haiku"
111+
language "C++"
112+
files {root_dir.."src/nfd_haiku.cpp"}
108113

109114

110115
filter {"system:linux", "options:linux_backend=gtk3"}
@@ -174,6 +179,10 @@ local make_test = function(name)
174179
filter {"system:macosx"}
175180
links {"Foundation.framework", "AppKit.framework"}
176181

182+
filter {"system:haiku"}
183+
-- should link to stdc++.r4 for gcc2
184+
links {"be", "tracker", "stdc++"}
185+
177186
filter {"configurations:Debug", "system:linux", "options:linux_backend=gtk3"}
178187
linkoptions {"-lnfd_d `pkg-config --libs gtk+-3.0`"}
179188
filter {"configurations:Debug", "system:linux", "options:linux_backend=zenity"}
@@ -231,6 +240,7 @@ newaction
231240
premake_do_action("gmake", "linux", true,{})
232241
premake_do_action("gmake", "linux", true,{linux_backend='zenity'})
233242
premake_do_action("gmake", "macosx", true,{})
243+
premake_do_action("gmake", "haiku", true,{})
234244
premake_do_action("gmake", "windows", true,{})
235245
end
236246
}
@@ -276,6 +286,7 @@ newaction
276286
"xcode4",
277287
"gmake_linux",
278288
"gmake_macosx",
289+
"gmake_haiku",
279290
"gmake_windows"
280291
}
281292

0 commit comments

Comments
 (0)