[channels,tsmf] fix gstreamer detection
This commit is contained in:
parent
dcefd4f861
commit
1d06edb8d9
@ -20,29 +20,19 @@ define_channel_client("tsmf")
|
||||
|
||||
message(DEPRECATION "TSMF channel is no longer maintained. Use [MS-RDPEVOR] (/video) instead.")
|
||||
|
||||
set(GSTREAMER_1_0_FEATURE_TYPE "RECOMMENDED")
|
||||
set(GSTREAMER_1_0_FEATURE_PURPOSE "multimedia")
|
||||
set(GSTREAMER_1_0_FEATURE_DESCRIPTION "multimedia redirection, audio and video playback")
|
||||
|
||||
if (WIN32)
|
||||
set(GSTREAMER_1_0_FEATURE_TYPE "DISABLED")
|
||||
find_package(PkgConfig)
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(gstreamer gstreamer-1.0)
|
||||
endif()
|
||||
if (APPLE)
|
||||
set(GSTREAMER_1_0_FEATURE_TYPE "OPTIONAL")
|
||||
|
||||
if (IOS)
|
||||
set(GSTREAMER_1_0_FEATURE_TYPE "DISABLED")
|
||||
if (WITH_GSTREAMER_1_0)
|
||||
if(gstreamer_FOUND)
|
||||
add_definitions(-DWITH_GSTREAMER_1_0)
|
||||
else()
|
||||
message(WARNING "gstreamer not detected, disabling support")
|
||||
endif()
|
||||
endif()
|
||||
if (ANDROID)
|
||||
set(GSTREAMER_1_0_FEATURE_TYPE "DISABLED")
|
||||
endif()
|
||||
|
||||
find_feature(GStreamer_1_0 ${GSTREAMER_1_0_FEATURE_TYPE} ${GSTREAMER_1_0_FEATURE_PURPOSE} ${GSTREAMER_1_0_FEATURE_DESCRIPTION})
|
||||
|
||||
if (WITH_GSTREAMER_1_0 AND GSTREAMER_1_0_FOUND)
|
||||
add_definitions(-DWITH_GSTREAMER_1_0)
|
||||
endif()
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
tsmf_audio.c
|
||||
|
@ -17,25 +17,37 @@
|
||||
|
||||
define_channel_client_subsystem("tsmf" "gstreamer" "decoder")
|
||||
|
||||
if(NOT GSTREAMER_1_0_FOUND)
|
||||
if(NOT gstreamer_FOUND)
|
||||
message(FATAL_ERROR "GStreamer library not found, but required for TSMF module.")
|
||||
endif()
|
||||
|
||||
set(SRC "tsmf_gstreamer.c")
|
||||
|
||||
if (GSTREAMER_1_0_FOUND)
|
||||
set(LIBS ${GSTREAMER_1_0_LIBRARIES})
|
||||
include_directories(${GSTREAMER_1_0_INCLUDE_DIRS})
|
||||
endif()
|
||||
pkg_check_modules(gstreamerbase gstreamer-base-1.0 REQUIRED)
|
||||
pkg_check_modules(gstreamervideo gstreamer-video-1.0 REQUIRED)
|
||||
pkg_check_modules(gstreamerapp gstreamer-app-1.0 REQUIRED)
|
||||
|
||||
set(LIBS
|
||||
${gstreamer_LIBRARIES}
|
||||
${gstreamerbase_LIBRARIES}
|
||||
${gstreamervideo_LIBRARIES}
|
||||
${gstreamerapp_LIBRARIES}
|
||||
)
|
||||
include_directories(
|
||||
${gstreamer_INCLUDE_DIRS}
|
||||
${gstreamerbase_INCLUDE_DIRS}
|
||||
${gstreamervideo_INCLUDE_DIRS}
|
||||
${gstreamerapp_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
||||
if(ANDROID)
|
||||
set(SRC ${SRC}
|
||||
tsmf_android.c)
|
||||
set(LIBS ${LIBS})
|
||||
tsmf_android.c)
|
||||
else()
|
||||
find_package(X11 REQUIRED)
|
||||
|
||||
list(APPENDSRC
|
||||
list(APPEND SRC
|
||||
tsmf_X11.c)
|
||||
list(APPEND LIBS
|
||||
${X11_LIBRARIES}
|
||||
|
Loading…
Reference in New Issue
Block a user