This repository has been archived by the owner on Oct 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Markus edited this page Nov 25, 2020
·
4 revisions
Welcome to the Premake5AppSystem wiki!
I recommend looking through the examples in this repository.
premakeApp.lua
Third_Party/SubLib.lua
Third_Party/SubApp/premakeApp.lua
To see how to use some of the features.
I also recommend looking through the premake/app.lua
and premake/utils.lua
files to see how it works, and it has some extra comments for the functions.
To make premake work you have to do this in the premake5.lua
file
There's an example and comments in the included premake5.lua
file
APP = require("premake/app")
UTILS = require("premake/utils")
UTILS.AddPlatforms()
UTILS.AddConfigurations()
local app = APP.GetLocalAPP()
APP.SetStartApp(app)
APP.PremakeWorkspace()
To create an app do this, you can alternatively return an array.
Though if you plan on having multiple apps in the file you should return an array from the beginning so others won't have to make changes.
-- "App" can be replaced with any name for the app
local app = APP.GetOrCreateApp("App")
return app
-- or
return { app }
To make the app include another app do either one of these functions
local thirdPartyApp = APP.GetThirdPartyApp("ThirdPartyApp") -- Loads an app at 'APP.thirdPartyFolder .. "ThirdPartyApp/premakeApp.lua"'
local thirdPartyLib = APP.GetThirdPartyLibrary("ThirdPartyLib") -- Loads an app at 'APP.thirdPartyFolder .. "ThirdPartyLib.lua"'
local customPathedApp = APP.GetApp("CustomPath/CustomPathedApp") -- Loads an app at '"CustomPath/CustomPathedLib/premakeApp.lua"'
local customPathedLib = APP.GetLibrary("CustomPath/CustomPathedLib") -- Loads an app at '"CustomPath/CustomPathedLib.lua"'
-- Then add it as a dependency for app (that you have created in the main premakeApp.lua file)
app.AddDependency(thirdPartyApp)
app.AddDependency(thirdPartyLib)
app.AddDependency(customPathedApp)
app.AddDependency(customPathedLib)