From bd25c5233bd273f43b8ddd04ce848b8ab2b6ed54 Mon Sep 17 00:00:00 2001 From: Kibae Shin Date: Sun, 3 Nov 2024 02:13:34 +0900 Subject: [PATCH] ci: can block the installation using an environment variable --- src/CMakeLists.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) 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