Skip to content

Commit

Permalink
Update lib.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
yonielwest authored Feb 21, 2024
1 parent bb4e67b commit f66bf3d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,10 @@ IF(${CURRENT_OS} STREQUAL "linux")
set_target_properties(vnn_face PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_SOURCE_DIR}/third_party/vnn/libs/${CURRENT_OS}/libvnn_face.so)

# add_library(vnn_core SHARED IMPORTED)
# # 设置目标库的实际路径
# set_target_properties(vnn_core PROPERTIES IMPORTED_LOCATION
# ${CMAKE_CURRENT_SOURCE_DIR}/third_party/vnn/libs/${CURRENT_OS}/libvnn_core.so)

add_library(vnn_core SHARED IMPORTED)
# 设置目标库的实际路径
set_target_properties(vnn_core PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_SOURCE_DIR}/third_party/vnn/libs/${CURRENT_OS}/libvnn_core.so)

set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-Wl,-rpath,./")
ELSEIF(${CURRENT_OS} STREQUAL "windows")
Expand Down Expand Up @@ -270,4 +269,4 @@ ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} PRE_BUILD
${EXPORT_HEADER} ${CMAKE_INCLUDE_OUTPUT_DIRECTORY}
COMMENT "Copying export headers to output/include directory.")
ENDMACRO()
EXPORT_INCLUDE()
EXPORT_INCLUDE()

0 comments on commit f66bf3d

Please sign in to comment.