Skip to content

Commit 16e8662

Browse files
authoredNov 3, 2023
Merge pull request #212 from ysohma/fix-pthread-link
Fix build error on Android
2 parents 08e4bb3 + d089446 commit 16e8662

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎contrib/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ include(GNUInstallDirs)
1313
# Set C++11 as default standard
1414
set(CMAKE_CXX_STANDARD 11)
1515

16+
set(THREADS_PREFER_PTHREAD_FLAG ON)
17+
find_package(Threads REQUIRED)
18+
1619
get_filename_component(gemmlowp_src ${gemmlowp_SOURCE_DIR} PATH)
1720

1821
if(WIN32)
@@ -24,7 +27,7 @@ if(WIN32)
2427
add_definitions(-DGEMMLOWP_ALLOW_INLINE_ASM)
2528
endif()
2629
else()
27-
set(EXTERNAL_LIBRARIES "pthread")
30+
set(EXTERNAL_LIBRARIES Threads::Threads)
2831
endif()
2932

3033
# Glob header files

0 commit comments

Comments
 (0)