From c3b4ab124e566cf70fdcf7063eb3e6c302564ca9 Mon Sep 17 00:00:00 2001 From: Tal Shiri Date: Mon, 5 Nov 2018 23:27:34 -0800 Subject: [PATCH] Fix Android build Android does not have libpthread, but instead exposes the pthread functions via Bionic See: https://android.googlesource.com/platform/bionic/+/10ce969/libc/bionic/pthread.c --- easy_profiler_core/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easy_profiler_core/CMakeLists.txt b/easy_profiler_core/CMakeLists.txt index 670f38c..ef70141 100644 --- a/easy_profiler_core/CMakeLists.txt +++ b/easy_profiler_core/CMakeLists.txt @@ -220,7 +220,9 @@ easy_define_target_option(easy_profiler EASY_OPTION_PREDEFINED_COLORS EASY_OPTIO # Add platform specific compile options: if (UNIX) target_compile_options(easy_profiler PRIVATE -Wall -Wno-long-long -Wno-reorder -Wno-braced-scalar-init -pedantic) - target_link_libraries(easy_profiler pthread) + if (!ANDROID) + target_link_libraries(easy_profiler pthread) + endif() elseif (WIN32) target_compile_definitions(easy_profiler PRIVATE -D_WIN32_WINNT=0x0600 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS) target_link_libraries(easy_profiler ws2_32 psapi)