From 297fda3be2f85e10aac69d6d5d9f2ad47a984a2f Mon Sep 17 00:00:00 2001 From: zhangli Date: Wed, 22 Feb 2023 19:54:41 +0800 Subject: [PATCH] avoid linking static libs in monolithic build --- csrc/mmdeploy/apis/cxx/CMakeLists.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/csrc/mmdeploy/apis/cxx/CMakeLists.txt b/csrc/mmdeploy/apis/cxx/CMakeLists.txt index 6a5160d9c6..4cf95c87aa 100644 --- a/csrc/mmdeploy/apis/cxx/CMakeLists.txt +++ b/csrc/mmdeploy/apis/cxx/CMakeLists.txt @@ -8,7 +8,6 @@ target_include_directories(${PROJECT_NAME} INTERFACE $ $) target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17) -target_link_libraries(${PROJECT_NAME} INTERFACE mmdeploy::core) set(_tasks ${MMDEPLOY_TASKS} pipeline) foreach (task ${_tasks}) target_link_libraries(mmdeploy_${task} INTERFACE ${PROJECT_NAME}) @@ -16,6 +15,21 @@ foreach (task ${_tasks}) DESTINATION include/mmdeploy) endforeach () if (TARGET mmdeploy) + target_include_directories(${PROJECT_NAME} INTERFACE + $ + $ + $ + ) + target_include_directories(${PROJECT_NAME} INTERFACE + $ + $ + $ + ) + if (NOT MMDEPLOY_SPDLOG_EXTERNAL) + target_include_directories(${PROJECT_NAME} INTERFACE + $ + $) + endif () target_link_libraries(mmdeploy INTERFACE ${PROJECT_NAME}) endif () mmdeploy_export(${PROJECT_NAME})