Skip to content

Commit a21c05b

Browse files
committed
Address PR comments
Signed-off-by: Ben Howe <[email protected]>
1 parent 7e68506 commit a21c05b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

libs/qec/lib/decoders/plugins/trt_decoder/CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ set(MODULE_NAME "cudaq-qec-trt-decoder")
1313
project(${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}")
2018
endif()
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:

0 commit comments

Comments
 (0)