aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarat Dukhan <marat@fb.com>2018-07-08 14:41:02 -0700
committerMarat Dukhan <marat@fb.com>2018-07-08 14:41:02 -0700
commit16bd2290da7673199dec90823bbc5063264e4095 (patch)
tree80dbc72d06768f25059956257eca13fd0237ce83
parent2b06b31f6a315162348e1f3c24325eedaf6cc559 (diff)
downloadplatform_external_pthreadpool-16bd2290da7673199dec90823bbc5063264e4095.tar.gz
platform_external_pthreadpool-16bd2290da7673199dec90823bbc5063264e4095.tar.bz2
platform_external_pthreadpool-16bd2290da7673199dec90823bbc5063264e4095.zip
Fix build on iOS platform using XCode generator. Close #2
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2affe4..2d66c07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,7 +94,9 @@ PTHREADPOOL_TARGET_ENABLE_C99(pthreadpool)
TARGET_LINK_LIBRARIES(pthreadpool PUBLIC pthreadpool_interface)
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
SET(CMAKE_THREAD_PREFER_PTHREAD TRUE)
- FIND_PACKAGE(Threads REQUIRED)
+ IF(NOT CMAKE_GENERATOR STREQUAL "Xcode")
+ FIND_PACKAGE(Threads REQUIRED)
+ ENDIF()
IF(CMAKE_USE_PTHREADS_INIT)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
TARGET_COMPILE_OPTIONS(pthreadpool PUBLIC -pthread)