all repos — mgba @ d794b2456634eed7c52b0adeed82252cae3967ac

mGBA Game Boy Advance Emulator

All: Clean up pthreads in CMakeList
Jeffrey Pfau jeffrey@endrift.com
Fri, 20 Feb 2015 23:18:18 -0800
commit

d794b2456634eed7c52b0adeed82252cae3967ac

parent

07feb10f6dd53efc5fe666c6232d4c83a52e09eb

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -110,8 +110,10 @@ list(APPEND OS_LIB ws2_32)

file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c) source_group("Windows-specific code" FILES ${OS_SRC}) else() - add_definitions(-DUSE_PTHREADS -D_GNU_SOURCE) - list(APPEND OS_LIB pthread) + add_definitions(-DUSE_PTHREADS) + if(NOT APPLE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") + endif() file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/posix/*.c) source_group("POSIX-specific code" FILES ${OS_SRC}) endif()