Skip to content

Commit

Permalink
Merge pull request #212 from ysohma/fix-pthread-link
Browse files Browse the repository at this point in the history
Fix build error on Android
  • Loading branch information
mariecwhite authored Nov 3, 2023
2 parents 08e4bb3 + d089446 commit 16e8662
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ include(GNUInstallDirs)
# Set C++11 as default standard
set(CMAKE_CXX_STANDARD 11)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

get_filename_component(gemmlowp_src ${gemmlowp_SOURCE_DIR} PATH)

if(WIN32)
Expand All @@ -24,7 +27,7 @@ if(WIN32)
add_definitions(-DGEMMLOWP_ALLOW_INLINE_ASM)
endif()
else()
set(EXTERNAL_LIBRARIES "pthread")
set(EXTERNAL_LIBRARIES Threads::Threads)
endif()

# Glob header files
Expand Down

0 comments on commit 16e8662

Please sign in to comment.