-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathpremake5.lua
More file actions
110 lines (94 loc) · 3.23 KB
/
premake5.lua
File metadata and controls
110 lines (94 loc) · 3.23 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
function fileExists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
function os.winSdkVersion()
local reg_arch = iif( os.is64bit(), "\\Wow6432Node\\", "\\" )
local sdk_version = os.getWindowsRegistry( "HKLM:SOFTWARE" .. reg_arch .."Microsoft\\Microsoft SDKs\\Windows\\v10.0\\ProductVersion" )
if sdk_version ~= nil then return sdk_version end
end
solution "Tutorials"
configurations { "Debug", "Release" }
language "C++"
flags { "NoMinimalRebuild" }
vectorextensions "SSE"
vectorextensions "SSE2"
-- define common includes
includedirs { ".","../RadeonProRender/include" }
-- perform OS specific initializations
local targetName;
if os.istarget("macosx") then
targetName = "osx"
platforms {"x64"}
else
platforms {"x64"}
end
if os.istarget("windows") then
targetName = "win"
defines{ "WIN32" }
if _ACTION == "vs2010" then
buildoptions { "/MP" } --multiprocessor build
defines {"_CRT_SECURE_NO_WARNINGS"}
configuration {"Release"}
end
end
if os.istarget("windows") then
os.execute("xcopy /Y \"..\\RadeonProRender\\binWin64\\RadeonProRender64.dll\" \".\\Bin\\\"")
os.execute("xcopy /Y \"..\\RadeonProRender\\binWin64\\RprLoadStore64.dll\" \".\\Bin\\\"")
os.execute("xcopy /Y \"..\\RadeonProRender\\binWin64\\Tahoe64.dll\" \".\\Bin\\\"")
os.execute("xcopy /Y \"..\\RadeonProRender\\binWin64\\Northstar64.dll\" \".\\Bin\\\"")
os.execute("xcopy /Y \"..\\RadeonProRender\\binWin64\\Hybrid.dll\" \".\\Bin\\\"")
os.execute("xcopy /Y \"..\\RadeonProRender\\binWin64\\ProRenderGLTF.dll\" \".\\Bin\\\"")
end
configuration "Debug"
defines { "_DEBUG" }
symbols "On"
configuration "Release"
defines { "NDEBUG" }
configuration {"x64", "Debug"}
targetsuffix "64D"
configuration {"x64", "Release"}
targetsuffix "64"
configuration {} -- back to all configurations
if os.istarget("windows") then
systemversion(os.winSdkVersion() .. ".0")
libdirs {"../RadeonProRender/libWin64" }
end
if os.istarget("linux") then
defines{ "__LINUX__" }
libdirs {"../RadeonProRender/binUbuntu18" }
end
if os.istarget("macosx") then
libdirs {"../RadeonProRender/binMacOS" }
end
defines{ "RPR_API_USE_HEADER_V2" } -- make sure to use the API V2: it's a safer C API
include "00_context_creation"
include "03_parameters_enumeration"
include "05_basic_scene"
include "12_transform_motion_blur"
include "13_deformation_motion_blur"
include "17_camera_dof"
include "21_material"
include "22_material_uber"
include "23_twosided"
include "24_contour"
include "25_toon"
include "26_materialx"
include "27_cutplanes"
include "30_tiled_render"
include "31_framebuffer_access"
include "32_gl_interop"
include "33_aov"
include "50_curve"
include "51_volume"
include "60_mesh_export"
include "61_mesh_import"
include "63_hybrid"
include "64_mesh_obj_demo"
include "65_mesh_convert"
if fileExists("./MultiTutorials/MultiTutorials.lua") then
dofile("./MultiTutorials/MultiTutorials.lua")
end
if fileExists("./parameters_enumeration/parameters_enumeration.lua") then
dofile("./parameters_enumeration/parameters_enumeration.lua")
end