forked from google-deepmind/mujoco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
111 lines (86 loc) · 2.14 KB
/
premake5.lua
File metadata and controls
111 lines (86 loc) · 2.14 KB
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
project "mujoco"
kind "StaticLib"
language "C++"
cppdialect "C++20"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
staticruntime "off"
warnings "off"
DefaultTargetParams(true)
-- For ccd, create config.h if doesn't already exist (to match cmake)
local configHeader = "src/vendor/ccd/src/ccd/config.h"
if not os.isfile(configHeader) then
print("Generating " .. configHeader)
io.writefile(configHeader, [[
#ifndef __CCD_CONFIG_H__
#define __CCD_CONFIG_H__
#define CCD_DOUBLE
#endif /* __CCD_CONFIG_H__ */
]])
end
files
{
"include/mujoco/*.h",
"src/engine/*.h",
"src/engine/*.c",
"src/engine/*.cc",
"src/xml/*.h",
"src/xml/*.cc",
"src/user/*.h",
"src/user/*.c",
"src/user/*.cc",
"src/thread/*.h",
"src/thread/*.cc",
-- Plugins (first-party)
"plugin/sdf/*.h",
"plugin/sdf/*.cc",
-- Dependencies (compiled here for now)
"src/vendor/ccd/src/*.h",
"src/vendor/ccd/src/*.c",
"src/vendor/tinyxml2/tinyxml2.h",
"src/vendor/tinyxml2/tinyxml2.cpp",
"src/vendor/tinyobjloader/tiny_obj_loader.h",
"src/vendor/tinyobjloader/tiny_obj_loader.cc",
"src/vendor/lodepng/lodepng.h",
"src/vendor/lodepng/lodepng.cpp",
"src/vendor/qhull/src/libqhull_r/**.h",
"src/vendor/qhull/src/libqhull_r/**.c",
}
includedirs
{
"include",
"src",
"src/vendor/ccd/src",
"src/vendor/tinyxml2",
"src/vendor/tinyobjloader",
"src/vendor/marchingcubecpp",
"src/vendor/trianglemeshdistance",
"src/vendor/lodepng",
"src/vendor/qhull/src",
"src/vendor/qhull/src/libqhull_r",
}
defines
{
"MJ_STATIC",
"MC_IMPLEM_ENABLE"
}
filter "configurations:Debug"
runtime "Debug"
symbols "on"
filter { "system:windows", "configurations:Debug-AS" }
runtime "Debug"
symbols "on"
sanitize { "Address" }
flags { "NoRuntimeChecks", "NoIncrementalLink" }
filter "configurations:Release"
runtime "Release"
optimize "speed"
filter "configurations:Dist"
runtime "Release"
optimize "speed"
symbols "off"
-- Needed for `strnlen`.
filter "system:windows"
cdialect "C11"
filter "toolset:gcc or toolset:clang"
cdialect "gnu11"