Commit 72cb2e3e authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cmake: Detect matroska.

parent 762d9f99
# - Find library containing Matroska()
# The following variables are set if Matroska is found. If Matroska is not
# found, Matroska_FOUND is set to false.
# Matroska_FOUND - System has Matroska.
# Matroska_LIBRARIES - Link these to use Matroska.
# Matroska_CFLAGS - Link these to use Matroska.
if (NOT Matroska_SEARCHED)
include(CheckLibraryExists)
set(Matroska_SEARCHED TRUE CACHE INTERNAL "")
set(Matroska_FOUND FALSE CACHE INTERNAL "")
pkg_check_modules(matroska libmatroska)
if (NOT Matroska_FOUND)
set(Matroska_LIBRARIES "")
find_library( matroska_LIBRARY matroska )
if (matroska_LIBRARY)
set(Matroska_LIBRARIES "${matroska_LIBRARY}")
set(Matroska_FOUND TRUE CACHE INTERNAL "")
endif (matroska_LIBRARY)
foreach (library ebml ebml_pic)
find_library( ${library}_LIBRARY ${library} )
if (${library}_LIBRARY)
set(Matroska_LIBRARIES "${library};${Matroska_LIBRARIES}")
endif (${library}_LIBRARY)
endforeach (library)
set(Matroska_LIBRARIES "${Matroska_LIBRARIES}" CACHE INTERNAL STRING)
endif (NOT Matroska_FOUND)
if (Matroska_FOUND)
if (NOT Matroska_FIND_QUIETLY)
message(STATUS "Found Matroska in: ${Matroska_LIBRARIES}")
endif (NOT Matroska_FIND_QUIETLY)
else (Matroska_FOUND)
if (Matroska_FIND_REQUIRED)
message(FATAL_ERROR "Could not find the library containing Matroska")
endif (Matroska_FIND_REQUIRED)
endif (Matroska_FOUND)
mark_as_advanced(Matroska_LIBRARIES)
endif(NOT Matroska_SEARCHED)
......@@ -425,6 +425,7 @@ if(QT4_FOUND)
vlc_enable_modules(qt4)
vlc_add_module_compile_flag(qt4 ${QT_CFLAGS} )
vlc_module_add_link_libraries(qt4 ${QT_LIBRARIES})
# Define our own qt4_wrap_ui macro to match wanted behaviour
MACRO (VLC_QT4_WRAP_UI outfiles )
FOREACH (it ${ARGN})
......@@ -438,7 +439,6 @@ if(QT4_FOUND)
MAIN_DEPENDENCY ${infile})
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH (it)
ENDMACRO (VLC_QT4_WRAP_UI)
endif(QT4_FOUND)
......@@ -453,6 +453,14 @@ if(OPENGL_FOUND)
vlc_module_add_link_libraries(opengl ${OPENGL_LIBRARIES})
endif(OPENGL_FOUND)
find_package(Matroska 0.7.7)
if(Matroska_FOUND)
vlc_enable_modules(mkv)
vlc_check_include_files (matroska/KaxAttachments.h)
vlc_check_include_files (matroska/KaxVersion.h)
vlc_module_add_link_libraries(mkv ${Matroska_LIBRARIES})
endif(Matroska_FOUND)
set(CMAKE_REQUIRED_INCLUDES)
###########################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment