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.
This commit is contained in:
Scott Mansell 2015-06-29 13:57:30 +12:00
parent 9065ddf5fa
commit ad714993aa
1 changed files with 8 additions and 0 deletions

View File

@ -313,6 +313,14 @@ if(WIN32)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE) add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
endif(WIN32) 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) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Build type (Release/Debug/RelWithDebInfo/MinSizeRe)" FORCE) "Build type (Release/Debug/RelWithDebInfo/MinSizeRe)" FORCE)