cmake: Solaris' SunPro has alternative way to link to pthread libraries
Fixes libsdl-org/SDL#10096
(cherry picked from commit 4fbd6cba60)
This commit is contained in:
1 parent
96b4535cc7
commit
e02f651c05
1 file changed
+5
-1
@@ -963,7 +963,11 @@ macro(CheckPTHREAD)
|
|||||||
set(PTHREAD_LDFLAGS "-lpthread")
|
set(PTHREAD_LDFLAGS "-lpthread")
|
||||||
elseif(SOLARIS)
|
elseif(SOLARIS)
|
||||||
set(PTHREAD_CFLAGS "-D_REENTRANT")
|
set(PTHREAD_CFLAGS "-D_REENTRANT")
|
||||||
set(PTHREAD_LDFLAGS "-pthread -lposix4")
|
if(CMAKE_C_COMPILER_ID MATCHES "SunPro")
|
||||||
|
set(PTHREAD_LDFLAGS "-mt -lpthread")
|
||||||
|
else()
|
||||||
|
set(PTHREAD_LDFLAGS "-pthread -lposix4")
|
||||||
|
endif()
|
||||||
elseif(SYSV5)
|
elseif(SYSV5)
|
||||||
set(PTHREAD_CFLAGS "-D_REENTRANT -Kthread")
|
set(PTHREAD_CFLAGS "-D_REENTRANT -Kthread")
|
||||||
set(PTHREAD_LDFLAGS "")
|
set(PTHREAD_LDFLAGS "")
|
||||||
|
|||||||
Reference in new issue
Block a user