Skip to content

Commit e210d57

Browse files
committed
remove other build in cmake, only keep samples
1 parent c8a5043 commit e210d57

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

CMakeLists.txt

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,12 @@ else()
3131
cmake_path(SET TRT_OUT_DIR ${TRT_OUT_DIR})
3232
endif()
3333

34-
# Required to export symbols to build *.libs
35-
if(WIN32)
36-
add_compile_definitions(TENSORRT_BUILD_LIB 1)
37-
endif()
38-
3934
# Set output paths
4035
set(RUNTIME_OUTPUT_DIRECTORY ${TRT_OUT_DIR} CACHE PATH "Output directory for runtime target files")
4136
set(LIBRARY_OUTPUT_DIRECTORY ${TRT_OUT_DIR} CACHE PATH "Output directory for library target files")
4237
set(ARCHIVE_OUTPUT_DIRECTORY ${TRT_OUT_DIR} CACHE PATH "Output directory for archive target files")
4338

44-
if(WIN32)
45-
set(STATIC_LIB_EXT "lib")
46-
else()
47-
set(STATIC_LIB_EXT "a")
48-
endif()
39+
set(STATIC_LIB_EXT "a")
4940

5041
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/NvInferVersion.h" VERSION_STRINGS REGEX "#define NV_TENSORRT_.*")
5142

@@ -75,8 +66,6 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
7566
set(CMAKE_INSTALL_PREFIX ${TRT_LIB_DIR}/../ CACHE PATH "TensorRT installation" FORCE)
7667
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
7768

78-
option(BUILD_PLUGINS "Build TensorRT plugin" ON)
79-
option(BUILD_PARSERS "Build TensorRT parsers" ON)
8069
option(BUILD_SAMPLES "Build TensorRT samples" ON)
8170

8271
# C++14
@@ -144,17 +133,10 @@ if(BUILD_PARSERS)
144133
endif()
145134

146135
# Windows library names have major version appended.
147-
if (MSVC)
148-
set(nvinfer_lib_name "nvinfer_${TRT_SOVERSION}")
149-
set(nvinfer_plugin_lib_name "nvinfer_plugin_${TRT_SOVERSION}")
150-
set(nvinfer_vc_plugin_lib_name "nvinfer_vc_plugin_${TRT_SOVERSION}")
151-
set(nvonnxparser_lib_name "nvonnxparser_${TRT_SOVERSION}")
152-
else()
153136
set(nvinfer_lib_name "nvinfer")
154137
set(nvinfer_plugin_lib_name "nvinfer_plugin")
155138
set(nvinfer_vc_plugin_lib_name "nvinfer_vc_plugin")
156139
set(nvonnxparser_lib_name "nvonnxparser")
157-
endif()
158140

159141
find_library_create_target(nvinfer ${nvinfer_lib_name} SHARED ${TRT_LIB_DIR})
160142

@@ -228,18 +210,6 @@ endif()
228210
############################################################################################
229211
# TensorRT
230212

231-
if(BUILD_PLUGINS)
232-
add_subdirectory(plugin)
233-
else()
234-
find_library_create_target(nvinfer_plugin ${nvinfer_plugin_lib_name} SHARED ${TRT_OUT_DIR} ${TRT_LIB_DIR})
235-
endif()
236-
237-
if(BUILD_PARSERS)
238-
add_subdirectory(parsers)
239-
else()
240-
find_library_create_target(nvonnxparser ${nvonnxparser_lib_name} SHARED ${TRT_OUT_DIR} ${TRT_LIB_DIR})
241-
endif()
242-
243213
if(BUILD_SAMPLES)
244214
add_subdirectory(samples)
245215
endif()

0 commit comments

Comments
 (0)