mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
cmake: improve pthread inclusion
This commit is contained in:
parent
3dfe46fc42
commit
8f975e2329
@ -406,6 +406,10 @@ add_dependencies(rpcs3 GitVersion)
|
|||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
find_package(GLEW 1.13.0 REQUIRED)
|
find_package(GLEW 1.13.0 REQUIRED)
|
||||||
target_link_libraries(rpcs3 GLEW::GLEW)
|
target_link_libraries(rpcs3 GLEW::GLEW)
|
||||||
|
|
||||||
|
set(CMAKE_THREAD_PREFER_PTHREAD 1)
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
target_link_libraries(rpcs3 Threads::Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
@ -419,7 +423,7 @@ target_link_libraries(rpcs3 xxhash)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib gdi32.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL setupapi.lib hidapi-hid Shlwapi.lib)
|
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib gdi32.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL setupapi.lib hidapi-hid Shlwapi.lib)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} opengl32.lib glu32.lib libpthread)
|
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} opengl32.lib glu32.lib)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(rpcs3 dxgi.lib d2d1.lib dwrite.lib)
|
target_link_libraries(rpcs3 dxgi.lib d2d1.lib dwrite.lib)
|
||||||
endif()
|
endif()
|
||||||
@ -438,7 +442,7 @@ else()
|
|||||||
if(VULKAN_FOUND)
|
if(VULKAN_FOUND)
|
||||||
target_link_libraries(rpcs3 ${VULKAN_LIBRARIES})
|
target_link_libraries(rpcs3 ${VULKAN_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(rpcs3 ${CMAKE_DL_LIBS} -lpthread ZLIB::ZLIB ${ADDITIONAL_LIBS})
|
target_link_libraries(rpcs3 ${CMAKE_DL_LIBS} ZLIB::ZLIB ${ADDITIONAL_LIBS})
|
||||||
if(USE_SYSTEM_FFMPEG)
|
if(USE_SYSTEM_FFMPEG)
|
||||||
link_libraries(${FFMPEG_LIBRARY_DIR})
|
link_libraries(${FFMPEG_LIBRARY_DIR})
|
||||||
target_link_libraries(rpcs3 libavformat.so libavcodec.so libavutil.so libswscale.so)
|
target_link_libraries(rpcs3 libavformat.so libavcodec.so libavutil.so libswscale.so)
|
||||||
|
@ -28,7 +28,4 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
|||||||
if(APPLE)
|
if(APPLE)
|
||||||
add_compile_options(-stdlib=libc++)
|
add_compile_options(-stdlib=libc++)
|
||||||
endif()
|
endif()
|
||||||
if(WIN32)
|
|
||||||
add_compile_options(-pthread)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user