From ad714993aaae2826a41fc55691d869e46bb3b479 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Mon, 29 Jun 2015 13:57:30 +1200 Subject: [PATCH] CMake: Explicitly pull in threads. Dolphin uses threads, but never actually pulled them it. Normally some library we depend on would pull threads in, but there are potential builds that forget to pull in threads. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5162b86dd4..347b87c2b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,6 +313,14 @@ if(WIN32) add_definitions(-D_CRT_SECURE_NO_DEPRECATE) endif(WIN32) +# Dolphin requires threads. +# The Apple build may not need an explicit flag because one of the +# frameworks may already provide it. +# But for non-OSX systems, we will use the CMake Threads package. +IF(NOT APPLE) + FIND_PACKAGE(Threads) +ENDIF(NOT APPLE) + if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (Release/Debug/RelWithDebInfo/MinSizeRe)" FORCE)