Skip to content

Commit 31a6b57

Browse files
authored
Merge pull request #45 from GPUOpen-LibrariesAndSDKs/demo_build_fix
Demos - fix build
2 parents 3ca5043 + 34672e0 commit 31a6b57

File tree

27 files changed

+134
-34
lines changed

27 files changed

+134
-34
lines changed
1.94 MB
Binary file not shown.

readme.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ On Visual Studio:
2020
then open tutorials/Tutorials.sln
2121
```
2222

23-
On Linux:
23+
On Ubuntu 18:
2424
Dependencies on Linux for the tutorials: GLEW, GLUT, Pthread.
2525
```
2626
> cd tutorials
@@ -29,6 +29,17 @@ Dependencies on Linux for the tutorials: GLEW, GLUT, Pthread.
2929
> make -j config=release_x64
3030
```
3131

32+
On Centos 7:
33+
Same dependencies than Ubuntu.
34+
You should also update your GCC, we have tested it with devtoolset-10 (yum install devtoolset-10)
35+
```
36+
> cd tutorials
37+
> sudo chmod +x ../premake5/linux64/premake5
38+
> ../premake5/linux64/premake5 --centos gmake
39+
> source scl_source enable devtoolset-10
40+
> make -j config=release_x64
41+
```
42+
3243
On MacOS:
3344
```
3445
> cd tutorials

tutorials/00_context_creation/premake4.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ project "00_context_creation"
99

1010
includedirs{ "../../RadeonProRender/inc" }
1111

12-
buildoptions "-std=c++11"
1312

1413
configuration {"x64"}
1514
links {"RadeonProRender64"}
15+
16+
if os.istarget("linux") then
17+
links {"pthread"}
18+
end
1619

1720
configuration {"x64", "Debug"}
1821
targetdir "../Bin"

tutorials/03_parameters_enumeration/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ int main()
6363
rpr_parameter_type type;
6464
CHECK( rprContextGetParameterInfo(context, int(i), RPR_PARAMETER_TYPE, sizeof(type), &type, NULL));
6565

66-
uint64_t value_length = 0;
66+
size_t value_length = 0;
6767
CHECK( rprContextGetParameterInfo(context, int(i), RPR_PARAMETER_VALUE, 0, NULL, &value_length) );
6868
char* paramValue = nullptr;
6969
if (value_length > 0)
@@ -165,7 +165,7 @@ int main()
165165
rpr_uint nodeInputType = 0;
166166
CHECK( rprMaterialNodeGetInputInfo(microfacet, i, RPR_MATERIAL_NODE_INPUT_TYPE, sizeof(nodeInputType), &nodeInputType, NULL) );
167167

168-
uint64_t inputValueSizeB = 0;
168+
size_t inputValueSizeB = 0;
169169
CHECK( rprMaterialNodeGetInputInfo(microfacet, i, RPR_MATERIAL_NODE_INPUT_VALUE, 0, NULL, &inputValueSizeB));
170170
char* materialParameterValue = new char[inputValueSizeB];
171171
CHECK( rprMaterialNodeGetInputInfo(microfacet, i, RPR_MATERIAL_NODE_INPUT_VALUE, inputValueSizeB, materialParameterValue, NULL));

tutorials/03_parameters_enumeration/premake4.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ project "03_parameters_enumeration"
1414

1515
includedirs{ "../../RadeonProRender/inc" }
1616

17-
buildoptions "-std=c++11"
17+
buildoptions "-std=c++14"
1818

1919
configuration {"x64"}
2020
links {"RadeonProRender64"}
21+
22+
if os.istarget("linux") then
23+
links {"pthread"}
24+
end
2125

2226
configuration {"x64", "Debug"}
2327
targetdir "../Bin"

tutorials/05_basic_scene/premake4.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ project "05_basic_scene"
99

1010
includedirs{ "../../RadeonProRender/inc" }
1111

12-
buildoptions "-std=c++11"
12+
buildoptions "-std=c++14"
1313

1414
configuration {"x64"}
1515
links {"RadeonProRender64"}
16+
17+
if os.istarget("linux") then
18+
links {"pthread"}
19+
end
1620

1721
configuration {"x64", "Debug"}
1822
targetdir "../Bin"

tutorials/12_transform_motion_blur/premake4.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ project "12_transform_motion_blur"
1010

1111
includedirs{ "../../RadeonProRender/inc" }
1212

13-
buildoptions "-std=c++11"
13+
buildoptions "-std=c++14"
1414

1515
configuration {"x64"}
1616
links {"RadeonProRender64"}
17+
18+
if os.istarget("linux") then
19+
links {"pthread"}
20+
end
1721

1822
configuration {"x64", "Debug"}
1923
targetdir "../Bin"

tutorials/13_deformation_motion_blur/premake4.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ project "13_deformation_motion_blur"
1010

1111
includedirs{ "../../RadeonProRender/inc" }
1212

13-
buildoptions "-std=c++11"
13+
buildoptions "-std=c++14"
1414

1515
configuration {"x64"}
1616
links {"RadeonProRender64"}
17+
18+
if os.istarget("linux") then
19+
links {"pthread"}
20+
end
1721

1822
configuration {"x64", "Debug"}
1923
targetdir "../Bin"

tutorials/17_camera_dof/premake4.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ project "17_camera_dof"
1010

1111
includedirs{ "../../RadeonProRender/inc" }
1212

13-
buildoptions "-std=c++11"
13+
buildoptions "-std=c++14"
1414

1515
configuration {"x64"}
1616
links {"RadeonProRender64"}
17+
18+
if os.istarget("linux") then
19+
links {"pthread"}
20+
end
1721

1822
configuration {"x64", "Debug"}
1923
targetdir "../Bin"

tutorials/21_material/premake4.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ project "21_material"
1010

1111
includedirs{ "../../RadeonProRender/inc" }
1212

13-
buildoptions "-std=c++11"
13+
buildoptions "-std=c++14"
1414

1515
configuration {"x64"}
1616
links {"RadeonProRender64"}
17+
18+
if os.istarget("linux") then
19+
links {"pthread"}
20+
end
1721

1822
configuration {"x64", "Debug"}
1923
targetdir "../Bin"

0 commit comments

Comments
 (0)