diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8dbdf54..99d4a13 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -95,13 +95,15 @@ if (NOT NO_ONNXRUNTIME_SERVER_TEST) endif () # install -set_target_properties(onnxruntime_server_standalone PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) -set_target_properties(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) - -install(TARGETS onnxruntime_server_standalone DESTINATION bin) -install(TARGETS ${PROJECT_NAME} DESTINATION lib) -install(TARGETS ${PROJECT_NAME}_static DESTINATION lib RENAME ${PROJECT_NAME}) -install(FILES onnxruntime_server.hpp DESTINATION include) -install(FILES transport/http/http_server.hpp DESTINATION include/transport/http) -install(FILES transport/tcp/tcp_server.hpp DESTINATION include/transport/tcp) -install(DIRECTORY utils DESTINATION include/utils) +if (NOT NO_ONNXRUNTIME_SERVER_INSTALL) + set_target_properties(onnxruntime_server_standalone PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) + set_target_properties(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) + + install(TARGETS onnxruntime_server_standalone DESTINATION bin) + install(TARGETS ${PROJECT_NAME} DESTINATION lib) + install(TARGETS ${PROJECT_NAME}_static DESTINATION lib RENAME ${PROJECT_NAME}) + install(FILES onnxruntime_server.hpp DESTINATION include) + install(FILES transport/http/http_server.hpp DESTINATION include/transport/http) + install(FILES transport/tcp/tcp_server.hpp DESTINATION include/transport/tcp) + install(DIRECTORY utils DESTINATION include/utils) +endif () \ No newline at end of file