Skip to content

Commit

Permalink
Add Haiku support to premake5.lua
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mmuman committed Oct 16, 2019
1 parent c458e21 commit 5497d1e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ workspace "NativeFileDialog"
platforms {"x64"}
filter "system:windows or system:linux"
platforms {"x64", "x86"}
filter "system:haiku"
platforms {"x86", "x64"}


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

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


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

filter {"system:haiku"}
-- should link to stdc++.r4 for gcc2
links {"be", "tracker", "stdc++"}

filter {"configurations:Debug", "system:linux", "options:linux_backend=gtk3"}
linkoptions {"-lnfd_d `pkg-config --libs gtk+-3.0`"}
filter {"configurations:Debug", "system:linux", "options:linux_backend=zenity"}
Expand Down Expand Up @@ -193,6 +202,7 @@ newaction
premake_do_action("gmake", "linux", true,{})
premake_do_action("gmake", "linux", true,{linux_backend='zenity'})
premake_do_action("gmake", "macosx", true,{})
premake_do_action("gmake", "haiku", true,{})
premake_do_action("gmake", "windows", true,{})
end
}
Expand Down Expand Up @@ -238,6 +248,7 @@ newaction
"xcode4",
"gmake_linux",
"gmake_macosx",
"gmake_haiku",
"gmake_windows"
}

Expand Down

0 comments on commit 5497d1e

Please sign in to comment.