注册 登录
开源计算机图形学社区(Open Source Computer Graphics Community) |OpenGPU Forum (2007-2013)| OpenGPU Project 返回首页

airengine的个人空间 http://www.opengpu.org/?22875 [收藏] [复制] [分享] [RSS]

日志

利用premake5生成AIREngine的工程

已有 49 次阅读2017-10-11 13:26 |个人分类:引擎开发

AIREngine为了使用更新的IDE(vs2015等),利用premake5来构建工程,之前的2008和2010是通过premake4去生成。

1.下载premake5:https://premake.github.io/download.html#v5

2.把premake5.exe放到如下目录:



3.编写premake5.lua
这个过程相对比较复杂,详细请参考premake5的lua语发说明:http://industriousone.com/topic/dependencies-premake5
这帖其中一个项目的lua代码:
--proj Engine
if( make_air_engine ) then
project "Engine"
local projectname = "Engine"
if IsIOS() then
CommonSet ( projectname, "StaticLib" )
else
CommonSet ( projectname, "SharedLib" )
end
local dirFilesList = 
"../Engine/Include/Common",
"../Engine/Include/Engine",
"../Engine/Include/Math",
"../Engine/Include/InputSystem",
"../Engine/Src/Engine",
"../Engine/Src/Math",
"../Engine/Src/Common",
"../Engine/Src/InputSystem",
}
SimpleAddFilesWithFolders( dirFilesList )
includedirs
{
"../Engine/Include/",
"../Engine/Include/Common/",
"../Engine/Include/Engine/",
"../Engine/Include/Math/",
"../Engine/Include/InputSystem",
"../Dependencies/include/",
"../Dependencies/Include/bass/",
"../Dependencies/Include/freetype-2.5.2/",
"../Dependencies/Include/DevIL177/",
"../Dependencies/Include/nedmalloc/",
"../Dependencies/Include/vld/",
--"../plugins/AgeInputSystem/Include",
}
local ignoreCompileFiles = 
{
"../Engine/Src/Engine/RenderTargetScene.cpp",
"../Engine/Src/Engine/RenderTargetLightBuffer.cpp",
"../Engine/Src/Engine/RenderTargetGBuffer.cpp",
"../Engine/Src/Engine/RenderTargetDepthMap.cpp",
"../Engine/Src/Engine/PostScreenCompositor.cpp",
"../Engine/Src/Engine/GBufferRenderProcess.cpp",
"../Engine/Src/Engine/PostProcessManager.cpp",
}
excludes( ignoreCompileFiles )
--[[
pchheader ( "stdafx.h" )
pchsource ( "stdafx.cpp" )
]]
configuration { "Debug" }
links { "lua514_d", "zlib_d", "zziplib_d", "freetype_d", "nedmalloc_d", "freeimage_d", "freeimageplus_d",  }
configuration { "Release", }
links { "lua514", "zlib", "zziplib", "freetype", "nedmalloc", "freeimage", "freeimageplus", }
configuration { }
if IsWin() then
links { "xinput", "dxguid", "dinput8", "winmm", }
elseif IsMac() then
links { "Cocoa.framework", "IOKit.framework", "Carbon.framework", }
elseif IsIOS() then
links { "Foundation.framework", }
elseif IsLinux() then
links { }
end
defines      { "ENGINE_EXPORTS", "GRAPHIC_EXPORTS", "MATH_EXPORTS", "LEFT_HAND_COORDINATE", "AIR_EXPORT", }
end

4.编写bat文件来执行生成
见上图的MakeVC2015.bat,内容如下:
premake5 vs2015
最后生成的工程如下图:

路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

‹‹
我的工具栏

关于我们|手机版|Archiver|开源计算机图形学社区(Open Source Computer Graphics Community) | OpenGPU Project | OpenGPU Forum (2007-2013)

GMT+8, 2017-10-23 23:14 , Processed in 0.039194 second(s), 15 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部