TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / cmake / modules / FindGTHREAD2.cmake
blob172ee5517e363767bd3dad755c3cdfb83041bbca
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)
16 endif()
18 find_path(GTHREAD2_INCLUDE_DIR
19         NAMES
20                 glib/gthread.h
21         PATH_SUFFIXES
22                 glib-2.0
23         HINTS
24                 ${PC_GTHREAD2_INCLUDE_DIRS}
25                 "${GTHREAD2_HINTS}/include"
27 include(FindWSLibrary)
28 FindWSLibrary(GTHREAD2_LIBRARY
29         NAMES
30                 gthread-2.0 gthread
31         HINTS
32                 ${PC_GTHREAD2_LIBRARY_DIRS}
33         WIN32_HINTS
34                 ${GTHREAD2_HINTS}
37 include(FindPackageHandleStandardArgs)
38 find_package_handle_standard_args(GTHREAD2 DEFAULT_MSG GTHREAD2_LIBRARY GTHREAD2_INCLUDE_DIR)
40 if(GTHREAD2_FOUND)
41         set(GTHREAD2_INCLUDE_DIRS ${GTHREAD2_INCLUDE_DIR})
42         set(GTHREAD2_LIBRARIES ${GTHREAD2_LIBRARY})
43 else()
44         set(GTHREAD2_INCLUDE_DIRS)
45         set(GTHREAD2_LIBRARIES)
46 endif()
48 mark_as_advanced(GTHREAD2_LIBRARIES GTHREAD2_INCLUDE_DIRS)