2017-10-25 14:57:25 +00:00
|
|
|
if(NOT CMAKE_CROSSCOMPILING)
|
|
|
|
find_package(PkgConfig QUIET)
|
|
|
|
pkg_check_modules(PC_OGG ogg)
|
|
|
|
endif()
|
2017-02-28 23:51:22 +00:00
|
|
|
|
2017-10-24 10:10:46 +00:00
|
|
|
set_extra_dirs_lib(OGG opus)
|
2017-03-07 12:39:23 +00:00
|
|
|
find_library(OGG_LIBRARY
|
|
|
|
NAMES ogg
|
2017-07-31 16:30:24 +00:00
|
|
|
HINTS ${HINTS_OGG_LIBDIR} ${PC_OGG_LIBDIR} ${PC_OGG_LIBRARY_DIRS}
|
|
|
|
PATHS ${PATHS_OGG_LIBDIR}
|
2017-10-25 14:57:25 +00:00
|
|
|
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
|
2017-03-07 12:39:23 +00:00
|
|
|
)
|
2017-10-24 10:10:46 +00:00
|
|
|
set_extra_dirs_include(OGG opus "${OGG_LIBRARY}")
|
|
|
|
find_path(OGG_INCLUDEDIR ogg.h
|
|
|
|
PATH_SUFFIXES ogg
|
|
|
|
HINTS ${HINTS_OGG_INCLUDEDIR} ${PC_OGG_INCLUDEDIR} ${PC_OGG_INCLUDE_DIRS}
|
|
|
|
PATHS ${PATHS_OGG_INCLUDEDIR}
|
2017-10-25 14:57:25 +00:00
|
|
|
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
|
2017-10-24 10:10:46 +00:00
|
|
|
)
|
2017-02-28 23:51:22 +00:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2017-03-02 11:31:20 +00:00
|
|
|
find_package_handle_standard_args(Ogg DEFAULT_MSG OGG_INCLUDEDIR)
|
2017-02-28 23:51:22 +00:00
|
|
|
|
2017-03-07 12:39:23 +00:00
|
|
|
mark_as_advanced(OGG_INCLUDEDIR OGG_LIBRARY)
|
2017-02-28 23:51:22 +00:00
|
|
|
|
2018-02-12 22:14:14 +00:00
|
|
|
if(OGG_FOUND)
|
|
|
|
set(OGG_INCLUDE_DIRS ${OGG_INCLUDEDIR})
|
|
|
|
if(OGG_LIBRARY)
|
|
|
|
set(OGG_LIBRARIES ${OGG_LIBRARY})
|
|
|
|
else()
|
|
|
|
set(OGG_LIBRARIES)
|
|
|
|
endif()
|
2017-03-07 12:39:23 +00:00
|
|
|
endif()
|