diff --git a/impl/droplet/CMakeLists.txt b/impl/droplet/CMakeLists.txt index f6ec94ff6..57f3ca5d7 100644 --- a/impl/droplet/CMakeLists.txt +++ b/impl/droplet/CMakeLists.txt @@ -14,9 +14,12 @@ endif() find_library(DIOPI_DROPLET_LIB NAMES ${DEVICEIMPL} HINTS ${DIOPI_DROPLET_DIR}/lib) message(STATUS "DIOPI-IMPL lib: ${DIOPI_DROPLET_LIB}") if(NOT DIOPI_DROPLET_LIB) - message(FATAL_ERROR "${DEVICEIMPL} library not found !") + message(FATAL_ERROR "${DEVICEIMPL} library not found !") endif() +add_library(${DEVICEIMPL} SHARED IMPORTED GLOBAL) +set_target_properties(${DEVICEIMPL} PROPERTIES IMPORTED_LOCATION ${DIOPI_DROPLET_LIB}) + if (TEST) add_subdirectory(test) endif() diff --git a/impl/droplet/test/CMakeLists.txt b/impl/droplet/test/CMakeLists.txt index ce5748e61..65c53e3e3 100644 --- a/impl/droplet/test/CMakeLists.txt +++ b/impl/droplet/test/CMakeLists.txt @@ -52,7 +52,7 @@ endif() target_link_libraries(${DIOPI_EXPORT_RT} PRIVATE -Wl,--no-as-needed diopiruntime -Wl,--as-needed) target_link_libraries(diopiruntime tangrt_shared) -target_link_libraries(diopiruntime ${DIOPI_DROPLET_LIB}) +target_link_libraries(diopiruntime ${DEVICEIMPL}) set(FUNCTION_SAVE_PATH "${DIOPI_TEST_DIR}/diopi_stub/csrc")