Skip to content

external

starkos edited this page Sep 24, 2013 · 8 revisions

The external function provides a way to reference projects that were created manually, or outside of Premake.

#!lua
external ("project")

The external() function behaves the same as project(), taking a name argument that is used as the project's file name.

Parameters

project is name of the project. If no explicit filename is provided (using filename) the appropriate file extension will be added for the current action: ".vcproj" for Visual Studio 2008, ".vcxproj" for Visual Studio 2010, etc.

Availability

Premake 5.0 or later; currently Visual Studio only.

Examples

#!lua
external "MyExternalProject"
   location "build/MyExternalProject"
   uuid "57940020-8E99-AEB6-271F-61E0F7F6B73B"
   kind "StaticLib"
   language "C++"

The external() function behaves the same as project(), taking a name argument that is used as the project's file name.

The calls to uuid(), kind(), and language() are mandatory; this information is needed to properly assemble the Premake-generated solution. The call to location() is optional and used to locate the directory containing the external project file.

The external project file does not need to exist at the time the solution is generated.

Clone this wiki locally