Advertisement
Patrickquinn1212

FindGThread.cmake

Sep 30th, 2019 (edited)
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.24 KB | None | 0 0
  1. # - Find the native GThread includes and library
  2. #
  3. # This module defines
  4. #  GTHREAD_INCLUDE_DIR, where to find gthread.h, etc.
  5. #  GTHREAD_LIBRARIES, the libraries to link against to use gthread.
  6. #  GTHREAD_FOUND, If false, do not try to use gthread.
  7. #  also defined, but not for general use are
  8. #  GTHREAD_LIBRARY, where to find the gthread library.
  9.  
  10.  
  11. #=============================================================================
  12. # Copyright 2010 henrik andersson
  13. #=============================================================================
  14.  
  15. SET(GTHREAD_FIND_REQUIRED ${GThread_FIND_REQUIRED})
  16.  
  17. find_path(GTHREAD_INCLUDE_DIR glib/gthread.h PATH_SUFFIXES glib-2.0/)
  18. mark_as_advanced(GTHREAD_INCLUDE_DIR)
  19.  
  20. set(GTHREAD_NAMES ${GTHREAD_NAMES} gthread-2.0 libgthread-2.0)
  21. find_library(GTHREAD_LIBRARY NAMES ${GTHREAD_NAMES} )
  22. mark_as_advanced(GTHREAD_LIBRARY)
  23.  
  24. # handle the QUIETLY and REQUIRED arguments and set GTHREAD_FOUND to TRUE if
  25. # all listed variables are TRUE
  26. include(FindPackageHandleStandardArgs)
  27. find_package_handle_standard_args(GThread DEFAULT_MSG GTHREAD_LIBRARY GTHREAD_INCLUDE_DIR)
  28.  
  29. IF(GTHREAD_FOUND)
  30.     SET(GThread_LIBRARIES ${GTHREAD_LIBRARY})
  31.     SET(GThread_INCLUDE_DIRS ${GTHREAD_INCLUDE_DIR})
  32. ENDIF(GTHREAD_FOUND)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement