2 # - Try to find GThread2
3 # Find GThread headers, libraries and the answer to all questions.
5 # GTHREAD2_FOUND True if GTHREAD2 was found
6 # GTHREAD2_INCLUDE_DIRS Location of GTHREAD2 headers
7 # GTHREAD2_LIBRARIES List of libraries to use GTHREAD2
10 include(FindWSWinLibs)
11 FindWSWinLibs("vcpkg-export-*" "GTHREAD2_HINTS")
13 if(NOT USE_REPOSITORY)
14 find_package(PkgConfig QUIET)
15 pkg_check_modules(PC_GTHREAD2 gthread-2.0)
18 find_path(GTHREAD2_INCLUDE_DIR
24 ${PC_GTHREAD2_INCLUDE_DIRS}
25 "${GTHREAD2_HINTS}/include"
27 include(FindWSLibrary)
28 FindWSLibrary(GTHREAD2_LIBRARY
32 ${PC_GTHREAD2_LIBRARY_DIRS}
37 include(FindPackageHandleStandardArgs)
38 find_package_handle_standard_args(GTHREAD2 DEFAULT_MSG GTHREAD2_LIBRARY GTHREAD2_INCLUDE_DIR)
41 set(GTHREAD2_INCLUDE_DIRS ${GTHREAD2_INCLUDE_DIR})
42 set(GTHREAD2_LIBRARIES ${GTHREAD2_LIBRARY})
44 set(GTHREAD2_INCLUDE_DIRS)
45 set(GTHREAD2_LIBRARIES)
48 mark_as_advanced(GTHREAD2_LIBRARIES GTHREAD2_INCLUDE_DIRS)