libobs: Use system header notation for pthread.h include
Using a relative path for the pthread.h header by w32-pthreads breaks compilation of plugins which include threading.h from libobs (as w32-pthreads will exist at a different location relative to the libobs header). As w32-pthreads (and its include directory) is added to the libobs target by CMake, the pthread.h header will be found even when using system header notation. Fixes https://github.com/obsproject/obs-studio/issues/7155master
parent
7c36cba065
commit
2bb0818fb4
|
@ -313,7 +313,7 @@ if(OS_WINDOWS)
|
|||
target_link_libraries(libobs PRIVATE Avrt Dwmapi winmm)
|
||||
|
||||
if(MSVC)
|
||||
target_link_libraries(libobs PRIVATE OBS::w32-pthreads)
|
||||
target_link_libraries(libobs PUBLIC OBS::w32-pthreads)
|
||||
|
||||
target_compile_options(libobs PRIVATE "$<$<COMPILE_LANGUAGE:C>:/EHc->"
|
||||
"$<$<COMPILE_LANGUAGE:CXX>:/EHc->")
|
||||
|
|
|
@ -26,12 +26,10 @@
|
|||
|
||||
#include "c99defs.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "../../deps/w32-pthreads/pthread.h"
|
||||
#else
|
||||
#ifndef _MSC_VER
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Reference in New Issue