Skip to content

Commit

Permalink
cmake : link dl explicitly for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
amqdn committed Oct 5, 2024
1 parent fa049cd commit e179dd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ggml/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,10 @@ if (MATH_LIBRARY)
endif()
endif()

if (CMAKE_SYSTEM_NAME MATCHES "Android")
list(APPEND GGML_EXTRA_LIBS_PRIVATE dl) # Must be linked explicitly
endif()

list(REMOVE_DUPLICATES GGML_EXTRA_LIBS_PRIVATE)
list(REMOVE_DUPLICATES GGML_EXTRA_LIBS_PUBLIC)
target_link_libraries(ggml PRIVATE ${GGML_EXTRA_LIBS_PRIVATE} PUBLIC ${GGML_EXTRA_LIBS_PUBLIC})
Expand Down

0 comments on commit e179dd4

Please sign in to comment.