File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
libs/qec/lib/decoders/plugins/trt_decoder Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,7 @@ set(MODULE_NAME "cudaq-qec-trt-decoder")
1313project (${MODULE_NAME} )
1414
1515# Set default TensorRT root if not provided
16- if (NOT DEFINED TENSORRT_ROOT)
17- message (STATUS "TENSORRT_ROOT not provided, using default: ${TENSORRT_ROOT} " )
18- else ()
16+ if (DEFINED TENSORRT_ROOT)
1917 message (STATUS "Using TENSORRT_ROOT: ${TENSORRT_ROOT} " )
2018endif ()
2119
@@ -104,9 +102,16 @@ if(TENSORRT_INCLUDE_DIR AND TENSORRT_LIBRARY AND TENSORRT_ONNX_LIBRARY)
104102 # ==============================================================================
105103
106104 if (NOT SKBUILD)
105+ if (DEFINED TENSORRT_ROOT)
106+ set (TENSORRT_BUILD_RPATH "$ORIGIN:${TENSORRT_ROOT} /lib" )
107+ set (TENSORRT_INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib:${TENSORRT_ROOT} /lib" )
108+ else ()
109+ set (TENSORRT_BUILD_RPATH "$ORIGIN" )
110+ set (TENSORRT_INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib:$ORIGIN/../../../tensorrt_libs" )
111+ endif ()
107112 set_target_properties (${MODULE_NAME} PROPERTIES
108- BUILD_RPATH "$ORIGIN: ${TENSORRT_ROOT} /lib "
109- INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib:$ORIGIN/../../../tensorrt_libs "
113+ BUILD_RPATH "${TENSORRT_BUILD_RPATH} "
114+ INSTALL_RPATH "${TENSORRT_INSTALL_RPATH} "
110115 )
111116
112117 # Let CMake automatically add paths of linked libraries to the RPATH:
You can’t perform that action at this time.
0 commit comments