1 find_package(PkgConfig)
2 pkg_check_modules(_OGG QUIET ogg)
4 find_path(OGG_INCLUDE_DIR
6 PATHS ${_OGG_INCLUDE_DIRS})
8 find_library(OGG_LIBRARY
10 HINTS ${_OGG_LIBRARY_DIRS})
16 include(FindPackageHandleStandardArgs)
17 find_package_handle_standard_args(OGG
18 REQUIRED_VARS OGG_INCLUDE_DIR OGG_LIBRARY
19 VERSION_VAR _OGG_VERSION)
21 if(OGG_FOUND AND NOT TARGET Ogg::ogg)
22 add_library(Ogg::ogg UNKNOWN IMPORTED)
23 set_target_properties(Ogg::ogg PROPERTIES
24 INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIR}"
25 IMPORTED_LOCATION "${OGG_LIBRARY}")