Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(droplet): add DEVICEIMPL as imported library #1341

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading