-
Notifications
You must be signed in to change notification settings - Fork 28
/
premake4.lua
74 lines (66 loc) · 1.49 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
72
73
74
RS_SDK_ROOT = os.getenv("RS_SDK_ROOT")
if not RS_SDK_ROOT then
printf("ERROR: Environment variable RS_SDK_ROOT is not set.")
printf("Set it to something like: C:\\Program Files (x86)\\Intel\\RSSDK")
os.exit()
end
JAVA_HOME = os.getenv("JAVA_HOME")
if not JAVA_HOME then
printf("ERROR: Environment variable JAVA_HOME is not set.")
printf("Set it to something like: C:\\Program Files (x86)\\Java\\jdk1.8.0_20")
os.exit()
end
BUILD_DIR = "build"
if _ACTION == "clean" then
os.rmdir(BUILD_DIR)
end
solution "gdx-realsense"
configurations { "Debug", "Release" }
location (BUILD_DIR .. "/" .. _ACTION)
project "gdx-realsense"
--- GENERAL STUFF FOR ALL PLATFORMS --------------------------------
kind "SharedLib"
language "C++"
platforms { "x64" }
location (BUILD_DIR .. "/" .. _ACTION)
files {
"./native/**.c*",
"./native/**.h",
}
includedirs {
("./native/include"),
(JAVA_HOME .. "/include"),
(JAVA_HOME .. "/include/win32")
}
--- debugdir "."
configuration "Debug"
targetdir "src"
targetsuffix "64"
defines {
"DEBUG",
}
flags { "Symbols" }
configuration "Release"
targetdir "src"
targetsuffix "64"
defines {
"NDEBUG",
}
flags { "Optimize" }
--- VISUAL STUDIO --------------------------------------------------
configuration "vs*"
flags {
"NoPCH",
"NoMinimalRebuild"
}
buildoptions { "/MP" }
defines {
"_CRT_SECURE_NO_WARNINGS",
"_CRT_NONSTDC_NO_WARNINGS"
}
libdirs {
(RS_SDK_ROOT .. "/lib/x64"),
}
links {
"libpxc",
}