diff --git a/vstrt/trtexec/CMakeLists.txt b/vstrt/trtexec/CMakeLists.txt index 5f9d91d..5cf426c 100644 --- a/vstrt/trtexec/CMakeLists.txt +++ b/vstrt/trtexec/CMakeLists.txt @@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.20) project(trtexec LANGUAGES CXX) -set(TENSORRT_HOME "" CACHE PATH "Path to TensorRT") -set(TENSORRT_LIBRARY_SUFFIX "" CACHE STRING "TensorRT library suffix") - find_package(CUDAToolkit REQUIRED) add_executable(trtexec @@ -26,20 +23,8 @@ add_executable(trtexec target_include_directories(trtexec PRIVATE ../common .. - ${CUDAToolkit_INCLUDE_DIRS} - ${TENSORRT_HOME}/include -) - -target_link_directories(trtexec PRIVATE - ${CUDAToolkit_LIBRARY_DIR} - ${TENSORRT_HOME}/lib ) -target_link_libraries(trtexec PRIVATE - CUDA::cudart_static - "nvinfer${TENSORRT_LIBRARY_SUFFIX}" - "nvinfer_plugin${TENSORRT_LIBRARY_SUFFIX}" - "nvonnxparser${TENSORRT_LIBRARY_SUFFIX}" -) +target_link_libraries(trtexec PRIVATE CUDA::cudart_static) install(TARGETS trtexec RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})