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)
18 find_path(GMODULE2_INCLUDE_DIR
24 ${PC_GMODULE2_INCLUDE_DIRS}
25 "${GMODULE2_HINTS}/include"
27 include(FindWSLibrary)
28 FindWSLibrary(GMODULE2_LIBRARY
32 ${PC_GMODULE2_LIBRARY_DIRS}
37 include(FindPackageHandleStandardArgs)
38 find_package_handle_standard_args(GMODULE2 DEFAULT_MSG GMODULE2_LIBRARY GMODULE2_INCLUDE_DIR)
41 set(GMODULE2_INCLUDE_DIRS ${GMODULE2_INCLUDE_DIR})
42 set(GMODULE2_LIBRARIES ${GMODULE2_LIBRARY})
44 set(GMODULE2_INCLUDE_DIRS)
45 set(GMODULE2_LIBRARIES)
48 mark_as_advanced(GMODULE2_LIBRARIES GMODULE2_INCLUDE_DIRS)