[channels,rdpecam] use default CHANNEL_RDPECAM_CLIENT

* use default CMake variable for channels
* set default depending on CMAKE_SYSTEM_NAME (currently only linux is
  supported)t
This commit is contained in:
akallabeth 2024-06-11 08:39:54 +02:00
parent a81d111ac4
commit 8a0706b6b7
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 38 additions and 41 deletions

View File

@ -1,8 +1,12 @@
set(OPTION_DEFAULT ON)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
set(OPTION_CLIENT_DEFAULT OFF)
if (NOT IOS AND NOT ANDROID AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(OPTION_CLIENT_DEFAULT ON)
endif()
define_channel_options(NAME "rdpecam" TYPE "dynamic"
DESCRIPTION "Video Capture Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPECAM]"

View File

@ -15,45 +15,38 @@
# See the License for the specific language governing permissions and
# limitations under the License.
option(WITH_MS_RDPECAM_CLIENT "Build with video camera redirect client" OFF)
if(WITH_MS_RDPECAM_CLIENT)
define_channel_client("rdpecam")
# swscale is required and is either part of FFMPEG or standalone library
if(NOT WITH_FFMPEG)
find_package(SWScale REQUIRED)
endif()
if(NOT WITH_OPENH264 AND NOT WITH_FFMPEG)
message(FATAL_ERROR "WITH_OPENH264 or WITH_FFMPEG required for WITH_MS_RDPECAM_CLIENT")
endif()
# currently camera redirect client supported for platforms with Video4Linux only
find_package(V4L)
if(V4L_FOUND)
set(WITH_V4L ON)
add_definitions("-DWITH_V4L")
else()
message(FATAL_ERROR "libv4l-dev required for WITH_MS_RDPECAM_CLIENT")
endif()
set(${MODULE_PREFIX}_SRCS
camera_device_enum_main.c
camera_device_main.c
encoding.c
)
set(${MODULE_PREFIX}_LIBS
freerdp winpr
)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")
if(V4L_FOUND)
add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "v4l" "")
endif()
define_channel_client("rdpecam")
# swscale is required and is either part of FFMPEG or standalone library
if(NOT WITH_FFMPEG)
find_package(SWScale REQUIRED)
endif()
if(NOT WITH_OPENH264 AND NOT WITH_FFMPEG)
message(FATAL_ERROR "WITH_OPENH264 or WITH_FFMPEG required for CHANNEL_RDPECAM_CLIENT")
endif()
# currently camera redirect client supported for platforms with Video4Linux only
find_package(V4L)
if(V4L_FOUND)
set(WITH_V4L ON)
add_definitions("-DWITH_V4L")
else()
message(FATAL_ERROR "libv4l-dev required for CHANNEL_RDPECAM_CLIENT")
endif()
set(${MODULE_PREFIX}_SRCS
camera_device_enum_main.c
camera_device_main.c
encoding.c
)
set(${MODULE_PREFIX}_LIBS
freerdp winpr
)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")
if(V4L_FOUND)
add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "v4l" "")
endif()

View File

@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if(WITH_MS_RDPECAM_CLIENT AND WITH_V4L)
if(WITH_V4L)
define_channel_client_subsystem("rdpecam" "v4l" "")