diff options
author | Marat Dukhan <marat@fb.com> | 2018-07-08 14:41:02 -0700 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2018-07-08 14:41:02 -0700 |
commit | 16bd2290da7673199dec90823bbc5063264e4095 (patch) | |
tree | 80dbc72d06768f25059956257eca13fd0237ce83 | |
parent | 2b06b31f6a315162348e1f3c24325eedaf6cc559 (diff) | |
download | platform_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.txt | 4 |
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) |