File tree Expand file tree Collapse file tree 4 files changed +59
-7
lines changed Expand file tree Collapse file tree 4 files changed +59
-7
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,42 @@ include_directories(
19
19
../RadeonProRender/inc
20
20
)
21
21
22
+
23
+
24
+ if (WIN32 )
25
+ message ("link_directories for WIN32" )
22
26
link_directories (
23
27
../RadeonProRender/libWin64
24
28
)
29
+ endif (WIN32 )
30
+
31
+ if (LINUX )
32
+ message ("link_directories for LINUX" )
33
+ link_directories (
34
+ ../RadeonProRender/binUbuntu20
35
+ )
36
+ endif (LINUX )
37
+
25
38
26
39
27
40
nanobind_add_module (rpr bind_rpr.cpp bind_common.cpp bind_common.h )
28
41
nanobind_add_module (rprs bind_rprs.cpp bind_common.cpp bind_common.h )
29
42
nanobind_add_module (rprgltf bind_rprgltf.cpp bind_common.cpp bind_common.h )
30
43
44
+
45
+ if (WIN32 )
31
46
target_link_libraries (rpr PUBLIC RadeonProRender64.lib )
32
47
target_link_libraries (rprs PUBLIC RprLoadStore64.lib )
33
48
target_link_libraries (rprgltf PUBLIC ProRenderGLTF.lib )
49
+ endif (WIN32 )
50
+
51
+
52
+ if (LINUX )
53
+ target_link_libraries (rpr PUBLIC RadeonProRender64 )
54
+ target_link_libraries (rprs PUBLIC RprLoadStore64 )
55
+ target_link_libraries (rprgltf PUBLIC ProRenderGLTF )
56
+ endif (LINUX )
57
+
58
+
59
+
34
60
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ enum class CreationFlags : rpr_creation_flags {
75
75
ENABLE_GPU15 = (1 << 18 ) ,
76
76
ENABLE_HIP = (1 << 19 ) ,
77
77
ENABLE_OPENCL = (1 << 20 ) ,
78
- ENABLE_DEBUG = (1 << 31 ) ,
78
+ ENABLE_DEBUG = (uint32_t )( 1 << 31 ) ,
79
79
};
80
80
enum class FilterType : rpr_aa_filter {
81
81
NONE = 0x0 ,
Original file line number Diff line number Diff line change 9
9
import sys
10
10
import os
11
11
12
+ binFolder = ""
13
+ if sys .platform == "linux" :
14
+ binFolder = "binUbuntu20"
15
+ elif sys .platform == "win32" :
16
+ binFolder = "binWin64"
17
+ else :
18
+ binFolder = "binMacOS"
19
+
20
+
12
21
# add the RPR Python library folder in order to import the rpr,rprs,rprgltf modules.
13
- sys .path .insert (1 , '../../python/build/Release' )
22
+ if sys .platform == "win32" :
23
+ sys .path .insert (1 , '../../python/build/Release' )
24
+
14
25
15
26
# we need to add the RPR DLLs
16
- os .add_dll_directory ( os .path .abspath (os .path .dirname (__file__ ) + '../../../RadeonProRender/binWin64' ) )
27
+ if sys .platform == "win32" :
28
+ os .add_dll_directory ( os .path .abspath (os .path .dirname (__file__ ) + '../../../RadeonProRender/' + binFolder ) )
17
29
30
+
18
31
import rpr
19
32
import rprs
20
33
import rprgltf
@@ -35,7 +48,7 @@ def RPRCHECK(retCode):
35
48
36
49
37
50
38
- plugin_id = rpr .RegisterPlugin ((str ("../../RadeonProRender/binWin64 /Northstar64.dll" )))
51
+ plugin_id = rpr .RegisterPlugin ((str ("../../RadeonProRender/" + binFolder + " /Northstar64.dll" )))
39
52
if ( plugin_id == - 1 ):
40
53
print (f"RPR ERROR: plugin not found." )
41
54
exit ()
Original file line number Diff line number Diff line change 9
9
import sys
10
10
import os
11
11
12
+ binFolder = ""
13
+ if sys .platform == "linux" :
14
+ binFolder = "binUbuntu20"
15
+ elif sys .platform == "win32" :
16
+ binFolder = "binWin64"
17
+ else :
18
+ binFolder = "binMacOS"
19
+
20
+
12
21
# add the RPR Python library folder in order to import the rpr,rprs,rprgltf modules.
13
- sys .path .insert (1 , '../../python/build/Release' )
22
+ if sys .platform == "win32" :
23
+ sys .path .insert (1 , '../../python/build/Release' )
24
+
14
25
15
26
# we need to add the RPR DLLs
16
- os .add_dll_directory ( os .path .abspath (os .path .dirname (__file__ ) + '../../../RadeonProRender/binWin64' ) )
27
+ if sys .platform == "win32" :
28
+ os .add_dll_directory ( os .path .abspath (os .path .dirname (__file__ ) + '../../../RadeonProRender/' + binFolder ) )
17
29
30
+
18
31
import rpr
19
32
import rprs
20
33
import ctypes
@@ -34,7 +47,7 @@ def RPRCHECK(retCode):
34
47
35
48
36
49
37
- plugin_id = rpr .RegisterPlugin ((str ("../../RadeonProRender/binWin64 /Northstar64.dll" )))
50
+ plugin_id = rpr .RegisterPlugin ((str ("../../RadeonProRender/" + binFolder + " /Northstar64.dll" )))
38
51
if ( plugin_id == - 1 ):
39
52
print (f"RPR ERROR: plugin not found." )
40
53
exit ()
You can’t perform that action at this time.
0 commit comments