123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- SET(_MPV_REQUIRED_VARS MPV_INCLUDE_DIR MPV_LIBRARY)
- if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_MPV QUIET mpv)
- endif(PKG_CONFIG_FOUND)
- find_path(
- MPV_INCLUDE_DIR
- NAMES mpv/client.h
- HINTS
- ${PC_MPV_INCLUDEDIR}
- ${PC_MPV_INCLUDE_DIRS}
- DOC "MPV include directory"
- )
- set(_MPV_LIBRARY_NAMES mpv)
- if(PC_MPV_LIBRARIES)
- set(_MPV_LIBRARY_NAMES ${PC_MPV_LIBRARIES})
- endif(PC_MPV_LIBRARIES)
- if(NOT WIN32)
- foreach(l ${_MPV_LIBRARY_NAMES})
- find_library(
- MPV_LIBRARY_${l}
- NAMES ${l}
- HINTS
- ${PC_MPV_LIBDIR}
- ${PC_MPV_LIBRARY_DIRS}
- PATH_SUFFIXES lib${LIB_SUFFIX}
- )
- list(APPEND MPV_LIBRARY ${MPV_LIBRARY_${l}})
- endforeach()
- get_filename_component(_MPV_LIBRARY_DIR ${MPV_LIBRARY_mpv} PATH)
- mark_as_advanced(MPV_LIBRARY)
- endif(NOT WIN32)
- set(MPV_LIBRARY_DIRS _MPV_LIBRARY_DIR)
- list(REMOVE_DUPLICATES MPV_LIBRARY_DIRS)
- mark_as_advanced(MPV_INCLUDE_DIR)
- mark_as_advanced(MPV_LIBRARY_DIRS)
- set(MPV_INCLUDE_DIRS ${MPV_INCLUDE_DIR})
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(
- MPV
- REQUIRED_VARS ${_MPV_REQUIRED_VARS}
- VERSION_VAR MPV_VERSION_STRING
- )
|