-
Notifications
You must be signed in to change notification settings - Fork 5
/
premake4.lua
73 lines (55 loc) · 1.48 KB
/
premake4.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!lua
function newplatform(plf)
local name = plf.name
local description = plf.description
-- Register new platform
premake.platforms[name] = {
cfgsuffix = "_"..name,
iscrosscompiler = true
}
-- Allow use of new platform in --platfroms
table.insert(premake.option.list["platform"].allowed, { name, description })
table.insert(premake.fields.platforms.allowed, name)
-- Add compiler support
-- gcc
premake.gcc.platforms[name] = plf.gcc
--other compilers (?)
end
newplatform {
name = "emscripten",
description = "emscripten",
gcc = {
cc = "emcc",
cxx = "emcc",
cppflags = ""
}
}
solution "EnvMapTool"
configurations { "Debug", "Release" }
platforms { "native", "emscripten" }
location ("projects/" .. _ACTION)
include "libs/libpng"
include "libs/zlib"
include "libs/libjpeg"
--include "libs/targa"
project "EnvMapTool"
kind "ConsoleApp"
language "C++"
files { "src/**.h", "src/**.cpp" }
targetdir("")
includedirs {
"src",
"libs/tclap/include/",
"libs/zlib/",
"libs/libpng/",
"libs/libjpeg/"
}
links { "png", "zlib", "jpeg" }
configuration "Debug"
debugdir "."
debugargs { "-i uffizi_cros.dds" }
defines { "DEBUG" }
flags { "Symbols" }
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize" }