jellyfin-media-player/CMakeModules/PlayerConfiguration.cmake
Tobias Hieta 9dd2897dff Add a simple check for mpv/qthelper.hpp
Some people have failing builds because they have a old version of mpv
that doesn't include the qthelper header. I have added a simple check
for this. Since there is no reliable way for us to currently check for
a specific version of mpv (constant flux) we might want to add checks
for some specific functionality instead.
2015-10-26 08:17:57 +01:00

20 lines
677 B
CMake

# We want OpenGL or OpenGLES2
find_package(OpenGL)
if(NOT OPENGL_FOUND)
find_package(GLES2)
if(NOT GLES2_FOUND)
message(FATAL_ERROR "OpenGL or GLES2 is required")
else(NOT GLES2_FOUND)
set(OPENGL_LIBS ${GLES2_LIBRARY})
endif(NOT GLES2_FOUND)
else(NOT OPENGL_FOUND)
set(OPENGL_LIBS ${OPENGL_gl_LIBRARY})
endif(NOT OPENGL_FOUND)
find_package(MPV REQUIRED)
include_directories(${MPV_INCLUDE_DIR})
find_path(MPV_QT_HELPER mpv/qthelper.hpp HINTS ${MPV_INCLUDE_DIR})
if(${MPV_QT_HELPER} STREQUAL "MPV_QT_HELPER-NOTFOUND")
message(FATAL_ERROR "Missing mpv/qthelper.h - maybe your mpv version is to old?")
endif(${MPV_QT_HELPER} STREQUAL "MPV_QT_HELPER-NOTFOUND")