forked from assimp/assimp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
157 lines (146 loc) · 4.4 KB
/
premake5.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
-- Script source: https://gist.github.com/Cannedfood/a71652022f066c8032f5a1c01919c55d
-- How to use:
-- 0. Get assimp from https://github.com/assimp/assimp
-- 1. Place this file next to the cloned assimp repository like this:
--
-- assimp.lua
-- assimp/
--
-- 2. Set up configuration headers
--
-- 2.1 Create a folder for configuration headers, I usually name it _config_headers/
--
-- _config_headers/assimp/ <- config.h will be included as "assimp/config.h" so the assimp/ part is important
-- assimp.lua
-- assimp
--
-- 2.2 Generate config.h and revision.h from assimp/code/config.h.in and assimp/revision.h.in and put them into _config_headers/assimp. (You can also just edit and rename them, that's what I usually end up doing.)
--
-- _config_headers/
-- assimp/
-- config.h
-- revision.h
-- assimp.lua
-- assimp
--
-- 3. Edit the 'files { ... }' and 'defines { ... }' depending on which importers/exporters you need. By default I enabled COLLADA, OBJ, FBX and ASSBIN (assimp binary, good for caching)
project 'assimp'
kind 'StaticLib'
warnings 'Off'
optimize 'Speed'
language "C++"
staticruntime "off"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("intermediate/" .. outputdir .. "/%{prj.name}")
includedirs {
'contrib/',
'contrib/irrXML/',
'contrib/unzip/',
'contrib/rapidjson/include/',
'code'
}
files {
-- Dependencies
'contrib/unzip/**',
'contrib/irrXML/**',
'contrib/zlib/*',
-- Common
'code/Common/**',
'code/PostProcessing/**',
'code/Material/**',
'code/CApi/**',
-- Importers
'code/Collada/**',
'code/Obj/**',
-- 'code/Blender/**', 'contrib/poly2tri/poly2tri/**',
'code/FBX/**',
'code/glTF2/**',
'code/glTF/**',
'code/Assbin/**' -- For caching
}
-- Importers
defines {
'ASSIMP_BUILD_NO_3D_IMPORTER',
'ASSIMP_BUILD_NO_3DS_IMPORTER',
'ASSIMP_BUILD_NO_3MF_IMPORTER',
'ASSIMP_BUILD_NO_AC_IMPORTER',
'ASSIMP_BUILD_NO_AMF_IMPORTER',
'ASSIMP_BUILD_NO_ASE_IMPORTER',
-- 'ASSIMP_BUILD_NO_ASSBIN_IMPORTER'
'ASSIMP_BUILD_NO_B3D_IMPORTER',
'ASSIMP_BUILD_NO_BLEND_IMPORTER',
'ASSIMP_BUILD_NO_BVH_IMPORTER',
'ASSIMP_BUILD_NO_C4D_IMPORTER',
'ASSIMP_BUILD_NO_COB_IMPORTER',
-- 'ASSIMP_BUILD_NO_COLLADA_IMPORTER',
'ASSIMP_BUILD_NO_CSM_IMPORTER',
'ASSIMP_BUILD_NO_DXF_IMPORTER',
-- 'ASSIMP_BUILD_NO_FBX_IMPORTER',
-- 'ASSIMP_BUILD_NO_GLTF_IMPORTER',
'ASSIMP_BUILD_NO_HMP_IMPORTER',
'ASSIMP_BUILD_NO_IFC_IMPORTER',
'ASSIMP_BUILD_NO_IRR_IMPORTER',
'ASSIMP_BUILD_NO_IRRMESH_IMPORTER',
'ASSIMP_BUILD_NO_LWO_IMPORTER',
'ASSIMP_BUILD_NO_LWS_IMPORTER',
'ASSIMP_BUILD_NO_M3D_IMPORTER',
'ASSIMP_BUILD_NO_MD2_IMPORTER',
'ASSIMP_BUILD_NO_MD3_IMPORTER',
'ASSIMP_BUILD_NO_MD5_IMPORTER',
'ASSIMP_BUILD_NO_MDC_IMPORTER',
'ASSIMP_BUILD_NO_MDL_IMPORTER',
'ASSIMP_BUILD_NO_MMD_IMPORTER',
'ASSIMP_BUILD_NO_MS3D_IMPORTER',
'ASSIMP_BUILD_NO_NDO_IMPORTER',
'ASSIMP_BUILD_NO_NFF_IMPORTER',
-- 'ASSIMP_BUILD_NO_OBJ_IMPORTER',
'ASSIMP_BUILD_NO_OFF_IMPORTER',
'ASSIMP_BUILD_NO_OGRE_IMPORTER',
'ASSIMP_BUILD_NO_OPENGEX_IMPORTER',
'ASSIMP_BUILD_NO_PLY_IMPORTER',
'ASSIMP_BUILD_NO_Q3BSP_IMPORTER',
'ASSIMP_BUILD_NO_Q3D_IMPORTER',
'ASSIMP_BUILD_NO_RAW_IMPORTER',
'ASSIMP_BUILD_NO_SIB_IMPORTER',
'ASSIMP_BUILD_NO_SMD_IMPORTER',
'ASSIMP_BUILD_NO_STEP_IMPORTER',
'ASSIMP_BUILD_NO_STL_IMPORTER',
'ASSIMP_BUILD_NO_TERRAGEN_IMPORTER',
'ASSIMP_BUILD_NO_X_IMPORTER',
'ASSIMP_BUILD_NO_X3D_IMPORTER',
'ASSIMP_BUILD_NO_XGL_IMPORTER'
}
defines {
'ASSIMP_BUILD_NO_COLLADA_EXPORTER',
'ASSIMP_BUILD_NO_X_EXPORTER',
'ASSIMP_BUILD_NO_STEP_EXPORTER',
'ASSIMP_BUILD_NO_OBJ_EXPORTER',
'ASSIMP_BUILD_NO_STL_EXPORTER',
'ASSIMP_BUILD_NO_PLY_EXPORTER',
'ASSIMP_BUILD_NO_3DS_EXPORTER',
'ASSIMP_BUILD_NO_GLTF_EXPORTER',
'ASSIMP_BUILD_NO_ASSBIN_EXPORTER',
'ASSIMP_BUILD_NO_ASSXML_EXPORTER',
'ASSIMP_BUILD_NO_X3D_EXPORTER',
'ASSIMP_BUILD_NO_FBX_EXPORTER',
'ASSIMP_BUILD_NO_M3D_EXPORTER',
'ASSIMP_BUILD_NO_3MF_EXPORTER',
'ASSIMP_BUILD_NO_ASSJSON_EXPORTER'
}
filter "system:windows"
systemversion "latest"
cppdialect "C++17"
filter "system:linux"
pic "On"
systemversion "latest"
cppdialect "C++17"
filter "configurations:Debug"
runtime "Debug"
symbols "on"
filter "configurations:Release"
runtime "Release"
optimize "on"
filter "configurations:Dist"
runtime "Release"
optimize "on"
symbols "off"