TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / cmake / modules / FindGMODULE2.cmake
blob187faef4abc5d060ae86c87e840e9eab528618f3
2 # - Try to find GModule2
3 # Find GModule headers, libraries and the answer to all questions.
5 #  GMODULE2_FOUND               True if GMODULE2 was found
6 #  GMODULE2_INCLUDE_DIRS        Location of GMODULE2 headers
7 #  GMODULE2_LIBRARIES           List of libraries to use GMODULE2
10 include(FindWSWinLibs)
11 FindWSWinLibs("vcpkg-export-*" "GMODULE2_HINTS")
13 if(NOT USE_REPOSITORY)
14         find_package(PkgConfig QUIET)
15         pkg_check_modules(PC_GMODULE2 gmodule-2.0)
16 endif()
18 find_path(GMODULE2_INCLUDE_DIR
19         NAMES
20                 gmodule.h
21         PATH_SUFFIXES
22                 glib-2.0
23         HINTS
24                 ${PC_GMODULE2_INCLUDE_DIRS}
25                 "${GMODULE2_HINTS}/include"
27 include(FindWSLibrary)
28 FindWSLibrary(GMODULE2_LIBRARY
29         NAMES
30                 gmodule-2.0 gmodule
31         HINTS
32                 ${PC_GMODULE2_LIBRARY_DIRS}
33         WIN32_HINTS
34                 ${GMODULE2_HINTS}
37 include(FindPackageHandleStandardArgs)
38 find_package_handle_standard_args(GMODULE2 DEFAULT_MSG GMODULE2_LIBRARY GMODULE2_INCLUDE_DIR)
40 if(GMODULE2_FOUND)
41         set(GMODULE2_INCLUDE_DIRS ${GMODULE2_INCLUDE_DIR})
42         set(GMODULE2_LIBRARIES ${GMODULE2_LIBRARY})
43 else()
44         set(GMODULE2_INCLUDE_DIRS)
45         set(GMODULE2_LIBRARIES)
46 endif()
48 mark_as_advanced(GMODULE2_LIBRARIES GMODULE2_INCLUDE_DIRS)