Skip to content

Commit

Permalink
build: add DEVICEIMPL as imported library in droplet
Browse files Browse the repository at this point in the history
  • Loading branch information
lljbash committed Aug 13, 2024
1 parent 65930a5 commit 40c4d29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion impl/droplet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion impl/droplet/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 40c4d29

Please sign in to comment.