Merge branch 'OpenSceneGraph-3.4' of https://github.com/openscenegraph/OpenSceneGraph into OpenSceneGraph-3.4
This commit is contained in:
commit
7e476c6f63
@ -33,6 +33,9 @@ ELSE()
|
||||
ADD_DEFINITIONS(-DHAVE_PTHREAD_CANCEL)
|
||||
ADD_DEFINITIONS(-DHAVE_PTHREAD_SETCANCELSTATE)
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES_SAFE "${CMAKE_REQUIRED_LIBRARIES}")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
CHECK_FUNCTION_EXISTS(pthread_yield HAVE_PTHREAD_YIELD)
|
||||
IF(HAVE_PTHREAD_YIELD)
|
||||
ADD_DEFINITIONS(-DHAVE_PTHREAD_YIELD)
|
||||
@ -43,6 +46,7 @@ ELSE()
|
||||
CHECK_LIBRARY_EXISTS(rt sched_yield "" HAVE_SCHED_YIELD)
|
||||
IF(HAVE_SCHED_YIELD)
|
||||
SET(CMAKE_THREAD_LIBS_INIT "${CMAKE_THREAD_LIBS_INIT} -lrt")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAFE} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(HAVE_SCHED_YIELD)
|
||||
@ -110,9 +114,6 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES_SAFE "${CMAKE_REQUIRED_LIBRARIES}")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
ADD_LIBRARY(${LIB_NAME}
|
||||
${OPENTHREADS_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||
${TARGET_H}
|
||||
|
Loading…
Reference in New Issue
Block a user