forked from bkaradzic/bimg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenie.lua
74 lines (61 loc) · 1.45 KB
/
genie.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
72
73
74
--
-- Copyright 2010-2024 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bimg/blob/master/LICENSE
--
newoption {
trigger = "with-amalgamated",
description = "Enable amalgamated build.",
}
newoption {
trigger = "with-shared-lib",
description = "Enable building shared library.",
}
newoption {
trigger = "with-tools",
description = "Enable building tools.",
}
solution "bimg"
configurations {
"Debug",
"Release",
}
if _ACTION == "xcode4" then
platforms {
"Universal",
}
else
platforms {
"x32",
"x64",
"Native", -- for targets where bitness is not specified
}
end
language "C++"
MODULE_DIR = path.getabsolute("..")
BIMG_DIR = path.getabsolute("..")
BX_DIR = os.getenv("BX_DIR")
local BIMG_BUILD_DIR = path.join(BIMG_DIR, ".build")
local BIMG_THIRD_PARTY_DIR = path.join(BIMG_DIR, "3rdparty")
if not BX_DIR then
BX_DIR = path.getabsolute(path.join(BIMG_DIR, "../bx"))
end
if not os.isdir(BX_DIR) then
print("bx not found at " .. BX_DIR)
print("For more info see: https://bkaradzic.github.io/bgfx/build.html")
os.exit()
end
dofile (path.join(BX_DIR, "scripts/toolchain.lua"))
if not toolchain(BIMG_BUILD_DIR, BIMG_THIRD_PARTY_DIR) then
return -- no action specified
end
function copyLib()
end
group "libs"
dofile(path.join(BX_DIR, "scripts/bx.lua"))
dofile "bimg.lua"
dofile "bimg_decode.lua"
dofile "bimg_encode.lua"
if _OPTIONS["with-tools"] then
group "tools"
dofile "texturec.lua"
end