forked from NVIDIA-Omniverse/connect-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
70 lines (60 loc) · 2.11 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
-- Shared build scripts from repo_build package
repo_build = require("omni/repo/build")
repo_build.root = os.getcwd()
-- Shared build scripts for use in client Connectors
connect_build = require(path.replaceextension(os.matchfiles("_build/target-deps/omni_connect_sdk/*/dev/tools/premake/connect-sdk-public.lua")[1], ""))
workspace "Samples"
connect_build.setup_workspace({
msvc_version = "14.29.30133",
winsdk_version = "10.0.18362.0",
})
-- override some connect_build settings
-- install exeutables and libraries in the main target_build_dir
target_bin_dir = target_build_dir
target_lib_dir = target_build_dir
function sample(projectName, sourceFolder)
project(projectName)
includedirs { "source/common/include" }
-- setup all paths, links, and carb dependencies to enable omni_connect_core
connect_build.use_omni_client()
connect_build.use_omni_resolver()
connect_build.use_usd({
"arch",
"gf",
"kind",
"pcp",
"plug",
"sdf",
"tf",
"usd",
"usdGeom",
"usdLux",
"usdPhysics",
"usdShade",
"usdSkel",
"usdUtils",
"vt",
})
connect_build.use_connect_core()
filter { "system:windows" }
-- This sets the working directory when debugging/running from Visual Studio
debugdir "$(ProjectDir)..\\..\\.."
filter { "configurations:debug" }
debugenvs "CARB_APP_PATH=$(ProjectDir)..\\..\\..\\_build\\windows-x86_64\\debug"
filter { "configurations:release" }
debugenvs "CARB_APP_PATH=$(ProjectDir)..\\..\\..\\_build\\windows-x86_64\\release"
filter {}
filter { "system:linux" }
links { "pthread", "stdc++fs" }
filter {}
connect_build.executable({
name = projectName,
sources = { "source/"..sourceFolder.."/**.*" },
})
end
sample("HelloWorld", "helloWorld", true)
sample("LiveSession", "liveSession")
sample("omnicli", "omnicli")
sample("omniUsdaWatcher", "omniUsdaWatcher")
sample("omniSimpleSensor", "omniSimpleSensor")
sample("omniSensorThread", "omniSensorThread")