Require pthreads lib on some platforms.

This commit is contained in:
Pavel Krajcevski 2013-10-11 19:42:00 -04:00
parent 86bb0f6d0e
commit a2bf21e515

View file

@ -66,6 +66,9 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
PATHS ${PVRTEXLIB_ROOT}/OSX_x86/Static
${PVRTEXLIB_ROOT}/OSX_x86/Dynamic
)
SET( USE_PTHREAD TRUE )
ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET( PVRTEXLIB_ROOT "/opt/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library" )
find_path(
@ -85,6 +88,8 @@ ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
)
ENDIF()
SET( USE_PTHREAD TRUE )
ELSEIF(MSVC)
SET( PVRTEXLIB_ROOT "C:/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library" )
find_path(
@ -105,7 +110,15 @@ ELSEIF(MSVC)
ENDIF()
ENDIF()
IF( USE_PTHREAD )
FIND_PACKAGE( Threads REQUIRED )
set(PVRTEXLIB_LIBRARIES
${PVRTEXLIB_LIB}
${CMAKE_THREAD_LIBS_INIT}
)
ELSE()
set(PVRTEXLIB_LIBRARIES ${PVRTEXLIB_LIB})
ENDIF()
set(PVRTEXLIB_INCLUDE_DIRS ${PVRTEXLIB_INCLUDE_DIR} )
include(FindPackageHandleStandardArgs)