-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpremake5_37.lua
151 lines (126 loc) · 3.54 KB
/
premake5_37.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
-- premake5.lua
workspace "autoremesher37"
architecture "x86_64"
startproject "autoremesher37"
configurations
{
"Debug",
"Release"
}
flags {
"MultiProcessorCompile"
}
-- Log library
defines {
"NDEBUG",
"AUTOREMESHER_EXPORTS",
"_WINDOWS",
"_USRDLL",
"_CRT_SECURE_NO_WARNINGS",
"_USE_MATH_DEFINES",
"NOMINMAX",
"PY_SSIZE_T_CLEAN",
"OPENEXR_DLL",
"HALF_EXPORTS"
}
undefines {
"UNICODE"
}
filter "Debug"
defines { "DEBUG" }
defines { "USE_SPDLOG" }
symbols "On"
buildoptions { "/Zm250", "/bigobj" }
-- defines { "PRINT_LINE" }
filter "Release"
optimize "Full"
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
group "ThirdParties"
include "ThirdParties/udan_debug"
include "ThirdParties/geogram"
group ""
project "autoremesher37"
kind "SharedLib"
language "C++"
cppdialect "C++14"
staticruntime "off"
targetextension ".pyd"
files {
"src/**.cpp",
"src/autoremesher/**.cpp",
"include/**.h",
"include/autoremesher/**.h"
}
libdirs {
"ThirdParties/python/37/libs",
"ThirdParties/zlib/build/Release",
"ThirdParties/openexr/lib",
"ThirdParties/openvdb/lib",
"ThirdParties/gmp/lib",
"ThirdParties/vcpkg/installed/x64-windows/lib"
}
includedirs {
"include",
"ThirdParties/udan_debug/include",
"ThirdParties/udan_utils/include",
"ThirdParties/geogram/include",
"ThirdParties/geogram/geogram_src/src/lib",
"ThirdParties/SpdLog/include",
"ThirdParties/python/37/include",
"ThirdParties/openvdb/include",
"ThirdParties/tbb/include",
"ThirdParties/geogram/src/lib",
"ThirdParties/geogram",
"ThirdParties/libigl/include",
"ThirdParties/eigen",
"ThirdParties/openexr/include",
"ThirdParties/vcpkg/installed/x64-windows/include"
}
links {
"openvdb",
"advapi32",
"shell32",
"user32",
"opengl32",
"udan_debug",
"geogram",
"libgmp-10",
"zlib"
}
filter "Release"
targetname "autoremesher.cp37-win_amd64"
libdirs {
"ThirdParties/tbb/lib"
}
links {
"Half_s",
"tbb",
"python37"
}
postbuildcommands {
"copy bin\\Release\\autoremesher.cp37-win_amd64.pyd mesh_autoremesher\\src",
"powershell -Command \"Compress-Archive -Update -LiteralPath 'mesh_autoremesher\' -DestinationPath mesh_autoremesher.zip\""
}
filter "Debug"
targetname "autoremesher_d.cp37-win_amd64"
libdirs {
"ThirdParties/tbb/lib/debug"
}
links {
"Half_s_d",
"tbb_debug",
"python37_d"
}
postbuildcommands {
"copy bin\\Debug\\autoremesher_d.cp37-win_amd64.pyd mesh_autoremesher\\src",
"powershell -Command \"Compress-Archive -Update -LiteralPath 'mesh_autoremesher\' -DestinationPath mesh_autoremesher.zip\""
}
local function disableVcpkg(prj)
premake.w('<VcpkgEnabled>No</VcpkgEnabled>')
end
require('vstudio')
premake.override(premake.vstudio.vc2010.elements, "globals", function(base, prj)
local calls = base(prj)
table.insertafter(calls, premake.vstudio.vc2010.globals, disableVcpkg)
return calls
end)