CMake: improve finding gstreamer
Support checking for multiple versions, first check gstreamer-1.0, then gstreamer-0.10. Add support for finding gstreamer-player. Specify the required components, add the include directories and link with the libraries of the found components. Set the setup variables wxUSE_GSTREAMER and wxUSE_GSTREAMER_PLAYER.
This commit is contained in:
@@ -216,7 +216,17 @@ if(wxUSE_GUI)
|
||||
endif()
|
||||
|
||||
if(wxUSE_MEDIACTRL AND UNIX AND NOT APPLE AND NOT WIN32)
|
||||
find_package(GStreamer)
|
||||
find_package(GStreamer 1.0 COMPONENTS video)
|
||||
if(NOT GSTREAMER_FOUND)
|
||||
find_package(GStreamer 0.10 COMPONENTS interfaces)
|
||||
endif()
|
||||
|
||||
set(wxUSE_GSTREAMER ${GSTREAMER_FOUND})
|
||||
set(wxUSE_GSTREAMER_PLAYER OFF)
|
||||
if(GSTREAMER_PLAYER_INCLUDE_DIRS)
|
||||
set(wxUSE_GSTREAMER_PLAYER ON)
|
||||
endif()
|
||||
|
||||
if(NOT GSTREAMER_FOUND)
|
||||
message(WARNING "GStreamer not found, wxMediaCtrl won't be available")
|
||||
wx_option_force_value(wxUSE_MEDIACTRL OFF)
|
||||
|
Reference in New Issue
Block a user