Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

App object

Markus edited this page Oct 20, 2020 · 3 revisions

Structure

{
  -- The name of the app
  name = "",
  -- The path to the app
  currentPath = "",
  -- Table of app dependencies
  dependencies = {},
  -- The group this app is part of
  group = "Libs",
  -- The location of the ide project files
  location = "Build/%{_ACTION}",
  -- The path where intermediate files end up at
  objectDir = "Output/" .. name .. "/Obj/",
  -- The path where the output files end up at
  targetDir = "Output/" .. name .. "/Bin/",
  -- The include path of the app
  includeDir = name .. "/Include/",
  -- The source path of the app
  sourceDir = name .. "/Source/",
  -- The resource path of the app
  resourceDir = name .. "/Assets/",
  -- The path to where to run the project from
  debugDir = name .. "/Run/",
  -- The warning level of the app
  warnings = "Default",
  -- Table of state objects
  states = {}
}

Functions

app

Syntax:

local currentPath, verbose = ...
local globalApp = require("premake/app")
local app = globalApp.app(name, currentPath, verbose)

Parameters:

name = string - The name of the app.
currentPath = string - The current local path of the app.
verbose = boolean - Should the function be verbose.

Return values:

App - It returns the newly created app.

local_app

Syntax:

local globalApp = require("premake/app")
local app = globalApp.local_app(verbose)

Parameters:

Verbose = boolean - Should the function be verbose

Return values:

App - It returns the app from premakeApp.lua.

third_party_app

Syntax:

local currentPath, verbose = ...
local globalApp = require("premake/app")
local app = globalApp.third_party_app(name, currentPath, verbose)

Parameters:

name = string - The name of the app.
currentPath = string - The current local path of the app.
verbose = boolean - Should the function be verbose.

Return values:

App - It returns the app at Third_Party/{name}/premakeApp.lua.

third_party_library

Syntax:

local currentPath, verbose = ...
local globalApp = require("premake/app")
local app = globalApp.third_party_library(name, currentPath, verbose)

Parameters:

name = string - The name of the library.
currentPath = string - The current local path of the app.
verbose = boolean - Should the function be verbose.

Return values:

App - It returns the library at Third_Party/{name}.lua.

addDependency

Syntax:

local globalApp = require("premake/app")
globalApp.addDependency(app, dependency, verbose)

Parameters:

app = App - The app to add the dependency to.
dependency = App - The dependency to add to the app.
verbose = boolean - Should the function be verbose.

addState

Syntax:

local globalApp = require("premake/app")
globalApp.addState(app, state, verbose)

Parameters:

app = App - The app to add the state to.
state = State - The state to add to the app.
verbose = boolean - Should the function be verbose.

Clone this wiki locally