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:
@@ -32,7 +32,26 @@ if(WXOSX_COCOA)
|
||||
)
|
||||
elseif(UNIX)
|
||||
wx_lib_include_directories(media PUBLIC ${GSTREAMER_INCLUDE_DIRS})
|
||||
if(GSTREAMER_INTERFACES_INCLUDE_DIRS)
|
||||
wx_lib_include_directories(media PUBLIC ${GSTREAMER_INTERFACES_INCLUDE_DIRS})
|
||||
endif()
|
||||
if(GSTREAMER_VIDEO_INCLUDE_DIRS)
|
||||
wx_lib_include_directories(media PUBLIC ${GSTREAMER_VIDEO_INCLUDE_DIRS})
|
||||
endif()
|
||||
if(GSTREAMER_PLAYER_INCLUDE_DIRS)
|
||||
wx_lib_include_directories(media PUBLIC ${GSTREAMER_PLAYER_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_LIBRARIES})
|
||||
if(GSTREAMER_INTERFACES_LIBRARIES)
|
||||
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_INTERFACES_LIBRARIES})
|
||||
endif()
|
||||
if(GSTREAMER_VIDEO_LIBRARIES)
|
||||
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_VIDEO_LIBRARIES})
|
||||
endif()
|
||||
if(GSTREAMER_PLAYER_LIBRARIES)
|
||||
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_PLAYER_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(media)
|
||||
|
Reference in New Issue
Block a user