2010-08-25 Rafael Antognolli <antognolli@profusion.mobi>
[WebKit-https.git] / cmake / FindGthread.cmake
index 7dabbee7cb45113b3f88ec5fb1874c7c9bcf0f7b..281e657b34e65d15b0aec6005765641cc2c73e9d 100644 (file)
@@ -1,21 +1,4 @@
-# Find include and libraries for GTHREAD library
-# GTHREAD_INCLUDE     Directories to include to use GTHREAD
-# GTHREAD_INCLUDE-I   Directories to include to use GTHREAD (with -I)
-# GTHREAD_LIBRARIES   Libraries to link against to use GTHREAD
-# GTHREAD_FOUND       GTHREAD was found
+# Find include and libraries for Gthread library
 
-IF (UNIX)
-    INCLUDE (UsePkgConfig)
-    PKGCONFIG (gthread-2.0 GTHREAD_include_dir GTHREAD_link_dir GTHREAD_libraries GTHREAD_include)
-    IF (GTHREAD_include AND GTHREAD_libraries)
-        SET (GTHREAD_FOUND TRUE)
-        EXEC_PROGRAM ("echo"
-            ARGS "${GTHREAD_include} | sed 's/[[:blank:]]*-I/;/g'"
-            OUTPUT_VARIABLE GTHREAD_INCLUDE
-        )
-        SET (GTHREAD_INCLUDE-I ${GTHREAD_include})
-        SET (GTHREAD_LIBRARIES ${GTHREAD_libraries})
-    ELSE (GTHREAD_include AND GTHREAD_libraries)
-        SET (GTHREAD_FOUND FALSE)
-    ENDIF (GTHREAD_include AND GTHREAD_libraries)
-ENDIF (UNIX)
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES (Gthread REQUIRED gthread-2.0>=2.20.0)