Merge pull request #10895 from akallabeth/cmake-format

Cmake format
This commit is contained in:
akallabeth 2024-11-28 14:52:19 +01:00 committed by GitHub
commit f7e5e6507b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
405 changed files with 6798 additions and 7757 deletions

View File

@ -1,4 +1,3 @@
# Generate .txt license file for CPack (PackageMaker requires a file extension)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt @ONLY)
@ -6,7 +5,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_BINARY_DIR}/L
# If c++ macros/defines are set __cplusplus is also set which causes
# problems when compiling freerdp/jni. To prevent this problem we set the macros to "".
if (ANDROID AND CMAKE_EXTRA_GENERATOR STREQUAL "Eclipse CDT4")
if(ANDROID AND CMAKE_EXTRA_GENERATOR STREQUAL "Eclipse CDT4")
set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "")
message(STATUS "Disabled CXX system defines for eclipse (workaround).")
endif()
@ -43,7 +42,7 @@ set(CPACK_PACKAGE_VERSION ${FREERDP_VERSION_FULL})
set(CPACK_PACKAGE_VERSION_MAJOR ${FREERDP_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${FREERDP_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${FREERDP_VERSION_REVISION})
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "FreeRDP: A Remote Desktop Protocol Implementation")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "FreeRDP: A Remote Desktop Protocol Implementation")
set(CPACK_PACKAGE_CONTACT "Marc-Andre Moreau")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "marcandre.moreau@gmail.com")
@ -67,9 +66,7 @@ if(MSVC)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT libraries)
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries)
endif()
endif()
@ -95,8 +92,7 @@ set(CPACK_COMPONENT_GROUP_RUNTIME_DESCRIPTION "Runtime")
set(CPACK_COMPONENT_GROUP_APPLICATIONS_DESCRIPTION "Applications")
set(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Development")
configure_file("${PROJECT_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
"${PROJECT_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/CMakeCPackOptions.cmake.in" "${PROJECT_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
set(CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CMakeCPackOptions.cmake")
include(CPack)

View File

@ -23,17 +23,13 @@ cmake_minimum_required(VERSION 3.13)
if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()
project(FreeRDP
LANGUAGES C
)
project(FreeRDP LANGUAGES C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
add_custom_target(fuzzers
COMMENT "Build fuzzers"
)
add_custom_target(fuzzers COMMENT "Build fuzzers")
if(NOT DEFINED VENDOR)
set(VENDOR "FreeRDP" CACHE STRING "FreeRDP package vendor")
@ -47,8 +43,8 @@ if(NOT DEFINED FREERDP_VENDOR)
set(FREERDP_VENDOR 1)
endif()
if (NOT WIN32 AND NOT ANDROID)
if (APPLE)
if(NOT WIN32 AND NOT ANDROID)
if(APPLE)
set(OPT_DEFAULT_VAL OFF)
else()
set(OPT_DEFAULT_VAL ON)
@ -57,7 +53,7 @@ if (NOT WIN32 AND NOT ANDROID)
endif()
# Enable coverity related pragma definitions
if (COVERITY_BUILD)
if(COVERITY_BUILD)
add_compile_definitions(COVERITY_BUILD)
endif()
@ -93,7 +89,7 @@ include(Doxygen)
# Soname versioning
set(BUILD_NUMBER 0)
if ($ENV{BUILD_NUMBER})
if($ENV{BUILD_NUMBER})
set(BUILD_NUMBER $ENV{BUILD_NUMBER})
endif()
@ -103,9 +99,9 @@ if(EXISTS "${PROJECT_SOURCE_DIR}/.source_tag")
file(READ ${PROJECT_SOURCE_DIR}/.source_tag RAW_VERSION_STRING)
elseif(USE_VERSION_FROM_GIT_TAG)
git_get_exact_tag(_GIT_TAG --tags --always)
if (NOT ${_GIT_TAG} STREQUAL "n/a")
if(NOT ${_GIT_TAG} STREQUAL "n/a")
string(REGEX MATCH ${VERSION_REGEX} FOUND_TAG "${_GIT_TAG}")
if (FOUND_TAG)
if(FOUND_TAG)
set(RAW_VERSION_STRING ${_GIT_TAG})
endif()
endif()
@ -119,26 +115,26 @@ string(REGEX REPLACE "${VERSION_REGEX}" "\\5" FREERDP_VERSION_SUFFIX "${RAW_VERS
set(FREERDP_API_VERSION "${FREERDP_VERSION_MAJOR}")
set(FREERDP_VERSION "${FREERDP_VERSION_MAJOR}.${FREERDP_VERSION_MINOR}.${FREERDP_VERSION_REVISION}")
if (FREERDP_VERSION_SUFFIX)
if(FREERDP_VERSION_SUFFIX)
set(FREERDP_VERSION_FULL "${FREERDP_VERSION}-${FREERDP_VERSION_SUFFIX}")
else()
set(FREERDP_VERSION_FULL "${FREERDP_VERSION}")
endif()
message("FREERDP_VERSION=${FREERDP_VERSION_FULL}")
if(EXISTS "${PROJECT_SOURCE_DIR}/.source_version" )
if(EXISTS "${PROJECT_SOURCE_DIR}/.source_version")
file(READ ${PROJECT_SOURCE_DIR}/.source_version GIT_REVISION)
string(STRIP ${GIT_REVISION} GIT_REVISION)
elseif(USE_VERSION_FROM_GIT_TAG)
git_get_exact_tag(GIT_REVISION --tags --always)
if (${GIT_REVISION} STREQUAL "n/a")
git_rev_parse (GIT_REVISION --short)
if(${GIT_REVISION} STREQUAL "n/a")
git_rev_parse(GIT_REVISION --short)
endif()
endif()
if (NOT GIT_REVISION)
if(NOT GIT_REVISION)
set(GIT_REVISION ${FREERDP_VERSION})
endif()
@ -151,43 +147,43 @@ set(FREERDP_MAJOR_DIR "freerdp${FREERDP_VERSION_MAJOR}")
set(FREERDP_INCLUDE_DIR "include/${FREERDP_MAJOR_DIR}/")
option(WITH_SMARTCARD_EMULATE "Emulate smartcards instead of redirecting readers" ON)
if (WITH_SMARTCARD_EMULATE)
if(WITH_SMARTCARD_EMULATE)
add_definitions(-DWITH_SMARTCARD_EMULATE)
find_package(ZLIB REQUIRED)
endif()
option(WITH_FREERDP_DEPRECATED "Build FreeRDP deprecated symbols" OFF)
if (WITH_FREERDP_DEPRECATED)
if(WITH_FREERDP_DEPRECATED)
add_definitions(-DWITH_FREERDP_DEPRECATED)
endif()
option(WITH_FREERDP_DEPRECATED_COMMANDLINE "Build FreeRDP deprecated command line options" OFF)
if (WITH_FREERDP_DEPRECATED_COMMANDLINE)
if(WITH_FREERDP_DEPRECATED_COMMANDLINE)
add_definitions(-DWITH_FREERDP_DEPRECATED_COMMANDLINE)
endif()
# Make paths absolute
if (CMAKE_INSTALL_PREFIX)
if(CMAKE_INSTALL_PREFIX)
get_filename_component(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
endif()
if (FREERDP_EXTERNAL_PATH)
get_filename_component (FREERDP_EXTERNAL_PATH "${FREERDP_EXTERNAL_PATH}" ABSOLUTE)
if(FREERDP_EXTERNAL_PATH)
get_filename_component(FREERDP_EXTERNAL_PATH "${FREERDP_EXTERNAL_PATH}" ABSOLUTE)
endif()
# Allow to search the host machine for git/ccache
if(CMAKE_CROSSCOMPILING)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
endif(CMAKE_CROSSCOMPILING)
find_program(CCACHE ccache)
if(CCACHE AND WITH_CCACHE)
if(NOT DEFINED CMAKE_C_COMPILER_LAUNCHER)
SET(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
endif(NOT DEFINED CMAKE_C_COMPILER_LAUNCHER)
endif(CCACHE AND WITH_CCACHE)
if(CMAKE_CROSSCOMPILING)
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
endif(CMAKE_CROSSCOMPILING)
# /Allow to search the host machine for git/ccache
@ -204,7 +200,7 @@ else()
option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF)
endif()
if (EXPORT_ALL_SYMBOLS)
if(EXPORT_ALL_SYMBOLS)
# set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_definitions(-DEXPORT_ALL_SYMBOLS)
endif(EXPORT_ALL_SYMBOLS)
@ -212,7 +208,7 @@ endif(EXPORT_ALL_SYMBOLS)
# Compiler-specific flags
if(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "i686")
CHECK_SYMBOL_EXISTS(__x86_64__ "" IS_X86_64)
check_symbol_exists(__x86_64__ "" IS_X86_64)
if(IS_X86_64)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
else()
@ -226,13 +222,13 @@ if(CMAKE_COMPILER_IS_GNUCC)
message(STATUS "GCC default symbol visibility: hidden")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
endif()
CHECK_C_COMPILER_FLAG (-Wimplicit-function-declaration Wimplicit-function-declaration)
check_c_compiler_flag(-Wimplicit-function-declaration Wimplicit-function-declaration)
if(Wimplicit-function-declaration)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wimplicit-function-declaration")
endif()
if (NOT OPENBSD)
CHECK_C_COMPILER_FLAG (-Wredundant-decls Wredundant-decls)
if(NOT OPENBSD)
check_c_compiler_flag(-Wredundant-decls Wredundant-decls)
if(Wredundant-decls)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wredundant-decls")
endif()
@ -256,16 +252,18 @@ if(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)
file(WRITE ${PROJECT_BINARY_DIR}/foo.txt "")
if(WITH_SANITIZE_ADDRESS)
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-fsanitize=address")
CHECK_C_COMPILER_FLAG ("-fsanitize=address" fsanitize-address)
CHECK_C_COMPILER_FLAG ("-fsanitize-blacklist=${PROJECT_BINARY_DIR}/foo.txt" fsanitize-blacklist)
CHECK_C_COMPILER_FLAG ("-fsanitize-address-use-after-scope" fsanitize-address-use-after-scope)
check_c_compiler_flag("-fsanitize=address" fsanitize-address)
check_c_compiler_flag("-fsanitize-blacklist=${PROJECT_BINARY_DIR}/foo.txt" fsanitize-blacklist)
check_c_compiler_flag("-fsanitize-address-use-after-scope" fsanitize-address-use-after-scope)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
if(fsanitize-blacklist)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/scripts/blacklist-address-sanitizer.txt")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/scripts/blacklist-address-sanitizer.txt"
)
endif(fsanitize-blacklist)
if(fsanitize-address-use-after-scope)
@ -273,34 +271,38 @@ if(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)
endif(fsanitize-address-use-after-scope)
elseif(WITH_SANITIZE_MEMORY)
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-fsanitize=memory")
CHECK_C_COMPILER_FLAG ("-fsanitize=memory" fsanitize-memory)
CHECK_C_COMPILER_FLAG ("-fsanitize-blacklist=${PROJECT_BINARY_DIR}/foo.txt" fsanitize-blacklist)
CHECK_C_COMPILER_FLAG ("-fsanitize-memory-use-after-dtor" fsanitize-memory-use-after-dtor)
CHECK_C_COMPILER_FLAG ("-fsanitize-memory-track-origins" fsanitize-memory-track-origins)
check_c_compiler_flag("-fsanitize=memory" fsanitize-memory)
check_c_compiler_flag("-fsanitize-blacklist=${PROJECT_BINARY_DIR}/foo.txt" fsanitize-blacklist)
check_c_compiler_flag("-fsanitize-memory-use-after-dtor" fsanitize-memory-use-after-dtor)
check_c_compiler_flag("-fsanitize-memory-track-origins" fsanitize-memory-track-origins)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=memory")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=memory")
if(fsanitize-blacklist)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/scripts/blacklist-memory-sanitizer.txt")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/scripts/blacklist-memory-sanitizer.txt"
)
endif(fsanitize-blacklist)
if (fsanitize-memory-use-after-dtor)
if(fsanitize-memory-use-after-dtor)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize-memory-use-after-dtor")
endif(fsanitize-memory-use-after-dtor)
if (fsanitize-memory-track-origins)
if(fsanitize-memory-track-origins)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize-memory-track-origins")
endif(fsanitize-memory-track-origins)
elseif(WITH_SANITIZE_THREAD)
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-fsanitize=thread")
CHECK_C_COMPILER_FLAG ("-fsanitize=thread" fsanitize-thread)
CHECK_C_COMPILER_FLAG ("-fsanitize-blacklist=${PROJECT_BINARY_DIR}/foo.txt" fsanitize-blacklist)
check_c_compiler_flag("-fsanitize=thread" fsanitize-thread)
check_c_compiler_flag("-fsanitize-blacklist=${PROJECT_BINARY_DIR}/foo.txt" fsanitize-blacklist)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread")
if(fsanitize-blacklist)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/scripts/blacklist-thread-sanitizer.txt")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/scripts/blacklist-thread-sanitizer.txt"
)
endif(fsanitize-blacklist)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=thread")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread")
@ -309,12 +311,12 @@ if(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)
file(REMOVE ${PROJECT_BINARY_DIR}/foo.txt)
set(CMAKE_REQUIRED_LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS_SAVED})
if (WITH_NO_UNDEFINED)
CHECK_C_COMPILER_FLAG (-Wl,--no-undefined no-undefined)
if(WITH_NO_UNDEFINED)
check_c_compiler_flag(-Wl,--no-undefined no-undefined)
if(no-undefined)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined" )
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
endif()
endif()
endif()
@ -326,6 +328,7 @@ if(MSVC)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
if(CMAKE_BUILD_TYPE STREQUAL "Release")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zi")
endif()
@ -367,9 +370,11 @@ if(WIN32)
set(RC_VERSION_VENDOR ${VENDOR})
set(RC_VERSION_PRODUCT ${PRODUCT})
set(RC_VERSION_PATCH ${BUILD_NUMBER})
set(RC_VERSION_DESCRIPTION "${FREERDP_VERSION_FULL} ${GIT_REVISION} ${CMAKE_WINDOWS_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
set(RC_VERSION_DESCRIPTION
"${FREERDP_VERSION_FULL} ${GIT_REVISION} ${CMAKE_WINDOWS_VERSION} ${CMAKE_SYSTEM_PROCESSOR}"
)
if (FREERDP_EXTERNAL_SSL_PATH)
if(FREERDP_EXTERNAL_SSL_PATH)
set(OPENSSL_ROOT_DIR ${FREERDP_EXTERNAL_SSL_PATH})
endif()
endif()
@ -379,37 +384,40 @@ add_definitions(-DFREERDP_EXPORTS)
# Mac OS X
if(APPLE)
if(IOS)
if (NOT FREERDP_IOS_EXTERNAL_SSL_PATH)
message(STATUS "FREERDP_IOS_EXTERNAL_SSL_PATH not set! Required if openssl is not found in the iOS SDK (which usually isn't")
if(NOT FREERDP_IOS_EXTERNAL_SSL_PATH)
message(
STATUS
"FREERDP_IOS_EXTERNAL_SSL_PATH not set! Required if openssl is not found in the iOS SDK (which usually isn't"
)
endif()
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${FREERDP_IOS_EXTERNAL_SSL_PATH})
set_property(GLOBAL PROPERTY XCODE_ATTRIBUTE_SKIP_INSTALL YES)
endif(IOS)
# Temporarily disabled, causes the cmake script to be reexecuted, causing the compilation to fail.
# Workaround: specify the parameter in the command-line
# if(WITH_CLANG)
# set(CMAKE_C_COMPILER "clang")
# endif()
# Temporarily disabled, causes the cmake script to be reexecuted, causing the compilation to fail.
# Workaround: specify the parameter in the command-line
# if(WITH_CLANG)
# set(CMAKE_C_COMPILER "clang")
# endif()
if (WITH_VERBOSE)
if(WITH_VERBOSE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -v")
endif()
endif(APPLE)
# Android
if(ANDROID)
set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ${ANDROID_LIBRARY_USE_LIB64_PATHS} )
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ${ANDROID_LIBRARY_USE_LIB64_PATHS})
if (${ANDROID_ABI} STREQUAL "armeabi")
set (WITH_NEON OFF)
if(${ANDROID_ABI} STREQUAL "armeabi")
set(WITH_NEON OFF)
endif()
if(ANDROID_ABI STREQUAL arm64-v8a)
include (CheckCCompilerFlag)
include(CheckCCompilerFlag)
check_c_compiler_flag("-mfloat-abi=softfp" ABI_SOFTFP_SUPPORTED)
if (ABI_SOFTFP_SUPPORTED)
if(ABI_SOFTFP_SUPPORTED)
# https://github.com/android/ndk/issues/910
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=softfp")
endif()
@ -430,22 +438,23 @@ if(ANDROID)
list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH})
list(REMOVE_DUPLICATES CMAKE_FIND_ROOT_PATH)
if (NOT FREERDP_EXTERNAL_PATH)
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/external/")
set (FREERDP_EXTERNAL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/external/")
if(NOT FREERDP_EXTERNAL_PATH)
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/external/")
set(FREERDP_EXTERNAL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/external/")
else()
message(STATUS "FREERDP_EXTERNAL_PATH not set!")
endif()
endif()
list (APPEND CMAKE_INCLUDE_PATH ${FREERDP_EXTERNAL_PATH}/${ANDROID_ABI}/include)
list (APPEND CMAKE_LIBRARY_PATH ${FREERDP_EXTERNAL_PATH}/${ANDROID_ABI}/ )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )
list(APPEND CMAKE_INCLUDE_PATH ${FREERDP_EXTERNAL_PATH}/${ANDROID_ABI}/include)
list(APPEND CMAKE_LIBRARY_PATH ${FREERDP_EXTERNAL_PATH}/${ANDROID_ABI}/)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
if (WITH_GPROF)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/scripts/gprof_generate.sh.cmake
${PROJECT_BINARY_DIR}/scripts/gprof_generate.sh @ONLY)
if(WITH_GPROF)
configure_file(
${PROJECT_SOURCE_DIR}/scripts/gprof_generate.sh.in ${PROJECT_BINARY_DIR}/scripts/gprof_generate.sh @ONLY
)
endif(WITH_GPROF)
endif()
@ -528,7 +537,7 @@ endif()
find_feature(Wayland ${WAYLAND_FEATURE_TYPE} ${WAYLAND_FEATURE_PURPOSE} ${WAYLAND_FEATURE_DESCRIPTION})
option(WITH_LIBRESSL "build with LibreSSL" OFF)
if (WITH_LIBRESSL)
if(WITH_LIBRESSL)
find_package(LibreSSL REQUIRED)
include_directories(SYSTEM ${LibreSSL_INCLUDE_DIRS})
set(OPENSSL_INCLUDE_DIR ${LIBRESSL_INCLUDE_DIR})
@ -545,7 +554,7 @@ endif()
find_feature(PCSC ${PCSC_FEATURE_TYPE} ${PCSC_FEATURE_PURPOSE} ${PCSC_FEATURE_DESCRIPTION})
if (WITH_DSP_FFMPEG OR WITH_VIDEO_FFMPEG OR WITH_FFMPEG)
if(WITH_DSP_FFMPEG OR WITH_VIDEO_FFMPEG OR WITH_FFMPEG)
find_package(FFmpeg REQUIRED COMPONENTS AVUTIL AVCODEC)
endif()
@ -557,20 +566,23 @@ find_feature(FAAD2 ${FAAD2_FEATURE_TYPE} ${FAAD2_FEATURE_PURPOSE} ${FAAD2_FEATUR
find_feature(FAAC ${FAAC_FEATURE_TYPE} ${FAAC_FEATURE_PURPOSE} ${FAAC_FEATURE_DESCRIPTION})
find_feature(soxr ${SOXR_FEATURE_TYPE} ${SOXR_FEATURE_PURPOSE} ${SOXR_FEATURE_DESCRIPTION})
if (WITH_OPENH264 AND NOT WITH_OPENH264_LOADING)
if(WITH_OPENH264 AND NOT WITH_OPENH264_LOADING)
option(WITH_OPENH264_LOADING "Use LoadLibrary to load openh264 at runtime" OFF)
endif (WITH_OPENH264 AND NOT WITH_OPENH264_LOADING)
endif(WITH_OPENH264 AND NOT WITH_OPENH264_LOADING)
# Version check, if we have detected FFMPEG but the version is too old
# deactivate it as sound backend.
if (WITH_DSP_FFMPEG)
if (AVCODEC_VERSION VERSION_LESS "57.48.101")
message(WARNING "FFmpeg version detected (${AVCODEC_VERSION}) is too old. (Require at least 57.48.101 for sound). Deactivating")
if(WITH_DSP_FFMPEG)
if(AVCODEC_VERSION VERSION_LESS "57.48.101")
message(
WARNING
"FFmpeg version detected (${AVCODEC_VERSION}) is too old. (Require at least 57.48.101 for sound). Deactivating"
)
set(WITH_DSP_FFMPEG OFF)
endif()
endif (WITH_DSP_FFMPEG)
endif(WITH_DSP_FFMPEG)
if (WITH_OPENH264 AND NOT OPENH264_FOUND)
if(WITH_OPENH264 AND NOT OPENH264_FOUND)
message(FATAL_ERROR "OpenH264 support requested but not detected")
endif()
set(WITH_OPENH264 ${OPENH264_FOUND})
@ -585,7 +597,7 @@ if(MBEDTLS_FOUND)
add_definitions("-DWITH_MBEDTLS")
endif()
if (WITH_OPENH264 OR WITH_MEDIA_FOUNDATION OR WITH_VIDEO_FFMPEG OR WITH_MEDIACODEC)
if(WITH_OPENH264 OR WITH_MEDIA_FOUNDATION OR WITH_VIDEO_FFMPEG OR WITH_MEDIACODEC)
set(WITH_GFX_H264 ON)
else()
set(WITH_GFX_H264 OFF)
@ -593,27 +605,27 @@ endif()
# Android expects all libraries to be loadable
# without paths.
if (ANDROID OR WIN32 OR MAC_BUNDLE)
if(ANDROID OR WIN32 OR MAC_BUNDLE)
set(PLUGIN_ABS_PATHS_DEFAULT OFF)
else()
set(PLUGIN_ABS_PATHS_DEFAULT ON)
endif()
option(WITH_ABSOLUTE_PLUGIN_LOAD_PATHS "Load plugins with absolute paths" ${PLUGIN_ABS_PATHS_DEFAULT})
if (NOT WITH_ABSOLUTE_PLUGIN_LOAD_PATHS)
if(NOT WITH_ABSOLUTE_PLUGIN_LOAD_PATHS)
set(FREERDP_DATA_PATH "share")
if (NOT FREERDP_INSTALL_PREFIX)
if(NOT FREERDP_INSTALL_PREFIX)
set(FREERDP_INSTALL_PREFIX ".")
endif()
set(FREERDP_LIBRARY_PATH ".")
set(FREERDP_PLUGIN_PATH ".")
else()
set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/${FREERDP_MAJOR_DIR}")
if (NOT FREERDP_INSTALL_PREFIX)
if(NOT FREERDP_INSTALL_PREFIX)
set(FREERDP_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
endif()
set(FREERDP_LIBRARY_PATH "${CMAKE_INSTALL_LIBDIR}")
if (WIN32)
if(WIN32)
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_BINDIR}/${FREERDP_MAJOR_DIR}")
else()
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}/${FREERDP_MAJOR_DIR}")
@ -638,8 +650,7 @@ endif()
if(ANDROID)
if(WITH_GPROF)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg")
set(PROFILER_LIBRARIES
"${FREERDP_EXTERNAL_PROFILER_PATH}/obj/local/${ANDROID_ABI}/libandroid-ndk-profiler.a")
set(PROFILER_LIBRARIES "${FREERDP_EXTERNAL_PROFILER_PATH}/obj/local/${ANDROID_ABI}/libandroid-ndk-profiler.a")
include_directories(SYSTEM "${FREERDP_EXTERNAL_PROFILER_PATH}")
endif()
endif()
@ -660,14 +671,14 @@ endif()
include(CommonConfigOptions)
if (FREERDP_UNIFIED_BUILD)
if(FREERDP_UNIFIED_BUILD)
add_subdirectory(winpr)
if (WITH_WAYLAND)
if(WITH_WAYLAND)
add_subdirectory(uwac)
endif()
if (WITH_SERVER)
if(WITH_SERVER)
option(WITH_RDTK "build rdtk toolkit" ON)
if (WITH_RDTK)
if(WITH_RDTK)
add_subdirectory(rdtk)
endif()
endif()
@ -690,12 +701,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
if(WITH_THIRD_PARTY)
add_subdirectory(third-party)
if (NOT "${THIRD_PARTY_INCLUDES}" STREQUAL "")
if(NOT "${THIRD_PARTY_INCLUDES}" STREQUAL "")
include_directories(SYSTEM ${THIRD_PARTY_INCLUDES})
endif()
endif()
add_subdirectory(libfreerdp)
if(WITH_CHANNELS)
@ -703,7 +713,7 @@ if(WITH_CHANNELS)
endif()
if(WITH_CLIENT_COMMON OR WITH_CLIENT)
add_subdirectory(client)
add_subdirectory(client)
endif()
if(WITH_SERVER)
@ -725,12 +735,12 @@ endif()
#message("VENDOR: ${VENDOR} CLIENT_VENDOR_PATH: ${CLIENT_VENDOR_PATH} CMAKE_CPACK_INCLUDE_FILE: ${CMAKE_CPACK_INCLUDE_FILE}")
set(FREERDP_BUILD_CONFIG_LIST "")
GET_CMAKE_PROPERTY(res VARIABLES)
FOREACH(var ${res})
IF (var MATCHES "^WITH_*|^BUILD_TESTING*|^WINPR_HAVE_*")
LIST(APPEND FREERDP_BUILD_CONFIG_LIST "${var}=${${var}}")
ENDIF()
ENDFOREACH()
get_cmake_property(res VARIABLES)
foreach(var ${res})
if(var MATCHES "^WITH_*|^BUILD_TESTING*|^WINPR_HAVE_*")
list(APPEND FREERDP_BUILD_CONFIG_LIST "${var}=${${var}}")
endif()
endforeach()
string(REPLACE ";" " " FREERDP_BUILD_CONFIG "${FREERDP_BUILD_CONFIG_LIST}")
add_subdirectory(include)
@ -740,8 +750,5 @@ include(${CMAKE_CPACK_INCLUDE_FILE})
message(STATUS "Intrinsic path configuration:")
#ShowCMakeVars("^CMAKE_INSTALL_PREFIX")
#ShowCMakeVars("^CMAKE_INSTALL_LIBDIR")
ShowCMakeVars("^FREERDP_INSTALL_PREFIX|^FREERDP_LIBRARY_PATH|^FREERDP_PLUGIN_PATH")
ShowCMakeVars("^FREERDP_ADDIN_PATH|^FREERDP_EXTENSION_PATH|^FREERDP_PROXY_PLUGINDIR")
showcmakevars("^FREERDP_INSTALL_PREFIX|^FREERDP_LIBRARY_PATH|^FREERDP_PLUGIN_PATH")
showcmakevars("^FREERDP_ADDIN_PATH|^FREERDP_EXTENSION_PATH|^FREERDP_PROXY_PLUGINDIR")

View File

@ -21,11 +21,7 @@ include(CMakeDependentOption)
macro(define_channel_options)
set(PREFIX "CHANNEL")
cmake_parse_arguments(${PREFIX}
""
"NAME;TYPE;DESCRIPTION;SPECIFICATIONS;DEFAULT"
""
${ARGN})
cmake_parse_arguments(${PREFIX} "" "NAME;TYPE;DESCRIPTION;SPECIFICATIONS;DEFAULT" "" ${ARGN})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" CHANNEL_OPTION)
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" CHANNEL_CLIENT_OPTION)
@ -52,8 +48,8 @@ macro(define_channel_options)
set(CHANNEL_OPTION_DOC "Build ${CHANNEL_NAME} ${CHANNEL_TYPE} channel")
if ("${CHANNEL_TYPE}" STREQUAL "DYNAMIC")
CMAKE_DEPENDENT_OPTION(${CHANNEL_OPTION} "${CHANNEL_OPTION_DOC}" ${CHANNEL_DEFAULT} "CHANNEL_DRDYNVC" OFF)
if("${CHANNEL_TYPE}" STREQUAL "DYNAMIC")
cmake_dependent_option(${CHANNEL_OPTION} "${CHANNEL_OPTION_DOC}" ${CHANNEL_DEFAULT} "CHANNEL_DRDYNVC" OFF)
else()
option(${CHANNEL_OPTION} "${CHANNEL_OPTION_DOC}" ${CHANNEL_DEFAULT})
endif()
@ -65,8 +61,9 @@ macro(define_channel_client_options _channel_client_default)
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" CHANNEL_OPTION)
set(CHANNEL_CLIENT_OPTION_DOC "Build ${CHANNEL_NAME} ${CHANNEL_TYPE} channel client")
CMAKE_DEPENDENT_OPTION(${CHANNEL_CLIENT_OPTION} "${CHANNEL_CLIENT_OPTION_DOC}"
${_channel_client_default} "${CHANNEL_OPTION}" OFF)
cmake_dependent_option(
${CHANNEL_CLIENT_OPTION} "${CHANNEL_CLIENT_OPTION_DOC}" ${_channel_client_default} "${CHANNEL_OPTION}" OFF
)
endmacro(define_channel_client_options)
macro(define_channel_server_options _channel_server_default)
@ -74,8 +71,9 @@ macro(define_channel_server_options _channel_server_default)
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" CHANNEL_OPTION)
set(CHANNEL_SERVER_OPTION_DOC "Build ${CHANNEL_NAME} ${CHANNEL_TYPE} channel server")
CMAKE_DEPENDENT_OPTION(${CHANNEL_SERVER_OPTION} "${CHANNEL_SERVER_OPTION_DOC}"
${_channel_server_default} "${CHANNEL_OPTION}" OFF)
cmake_dependent_option(
${CHANNEL_SERVER_OPTION} "${CHANNEL_SERVER_OPTION_DOC}" ${_channel_server_default} "${CHANNEL_OPTION}" OFF
)
endmacro(define_channel_server_options)
macro(define_channel _channel_name)
@ -119,27 +117,31 @@ macro(define_channel_server_subsystem _channel_name _subsystem _type)
endmacro(define_channel_server_subsystem)
macro(add_channel_client _channel_prefix _channel_name)
if (${_channel_prefix}_CLIENT)
if(${_channel_prefix}_CLIENT)
add_subdirectory(client)
if(${${_channel_prefix}_CLIENT_STATIC})
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${_channel_prefix} PARENT_SCOPE)
set(${_channel_prefix}_CLIENT_NAME ${${_channel_prefix}_CLIENT_NAME} PARENT_SCOPE)
set(${_channel_prefix}_CLIENT_CHANNEL ${${_channel_prefix}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${_channel_prefix}_CLIENT_ENTRY ${${_channel_prefix}_CLIENT_ENTRY} PARENT_SCOPE)
set(CHANNEL_STATIC_CLIENT_ENTRIES ${CHANNEL_STATIC_CLIENT_ENTRIES} ${${_channel_prefix}_CLIENT_ENTRY} PARENT_SCOPE)
set(CHANNEL_STATIC_CLIENT_ENTRIES ${CHANNEL_STATIC_CLIENT_ENTRIES} ${${_channel_prefix}_CLIENT_ENTRY}
PARENT_SCOPE
)
endif()
endif()
endmacro(add_channel_client)
macro(add_channel_server _channel_prefix _channel_name)
if (${_channel_prefix}_SERVER)
if(${_channel_prefix}_SERVER)
add_subdirectory(server)
if(${${_channel_prefix}_SERVER_STATIC})
set(CHANNEL_STATIC_SERVER_MODULES ${CHANNEL_STATIC_SERVER_MODULES} ${_channel_prefix} PARENT_SCOPE)
set(${_channel_prefix}_SERVER_NAME ${${_channel_prefix}_SERVER_NAME} PARENT_SCOPE)
set(${_channel_prefix}_SERVER_CHANNEL ${${_channel_prefix}_SERVER_CHANNEL} PARENT_SCOPE)
set(${_channel_prefix}_SERVER_ENTRY ${${_channel_prefix}_SERVER_ENTRY} PARENT_SCOPE)
set(CHANNEL_STATIC_SERVER_ENTRIES ${CHANNEL_STATIC_SERVER_ENTRIES} ${${_channel_prefix}_SERVER_ENTRY} PARENT_SCOPE)
set(CHANNEL_STATIC_SERVER_ENTRIES ${CHANNEL_STATIC_SERVER_ENTRIES} ${${_channel_prefix}_SERVER_ENTRY}
PARENT_SCOPE
)
endif()
endif()
endmacro(add_channel_server)
@ -165,7 +167,7 @@ macro(add_channel_client_subsystem _channel_prefix _channel_name _subsystem _typ
endmacro(add_channel_client_subsystem)
macro(channel_install _targets _destination _export_target)
if (NOT BUILD_SHARED_LIBS)
if(NOT BUILD_SHARED_LIBS)
foreach(_target_name IN ITEMS ${_targets})
target_include_directories(${_target_name} INTERFACE $<INSTALL_INTERFACE:include>)
endforeach()
@ -183,7 +185,7 @@ endmacro(client_channel_install)
macro(add_channel_client_library _module_prefix _module_name _channel_name _dynamic _entry)
set(_lnk_dir ${${_module_prefix}_LINK_DIRS})
if (NOT "${_lnk_dir}" STREQUAL "")
if(NOT "${_lnk_dir}" STREQUAL "")
link_directories(${_lnk_dir})
endif()
@ -195,15 +197,23 @@ macro(add_channel_client_library _module_prefix _module_name _channel_name _dyna
add_library(${_module_name} OBJECT ${${_module_prefix}_SRCS})
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
if (${_module_prefix}_LIBS)
if(${_module_prefix}_LIBS)
target_link_libraries(${_module_name} PUBLIC ${${_module_prefix}_LIBS})
endif()
client_channel_install(${_module_name} ${FREERDP_ADDIN_PATH})
endmacro(add_channel_client_library)
macro(add_channel_client_subsystem_library _module_prefix _module_name _channel_name _type _dynamic _entry)
macro(
add_channel_client_subsystem_library
_module_prefix
_module_name
_channel_name
_type
_dynamic
_entry
)
set(_lnk_dir ${${_module_prefix}_LINK_DIRS})
if (NOT "${_lnk_dir}" STREQUAL "")
if(NOT "${_lnk_dir}" STREQUAL "")
link_directories(${_lnk_dir})
endif()
@ -214,7 +224,7 @@ macro(add_channel_client_subsystem_library _module_prefix _module_name _channel_
add_library(${_module_name} OBJECT ${${_module_prefix}_SRCS})
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${_channel_name}/Client/Subsystem/${CHANNEL_SUBSYSTEM}")
if (${_module_prefix}_LIBS)
if(${_module_prefix}_LIBS)
target_link_libraries(${_module_name} PUBLIC ${${_module_prefix}_LIBS})
endif()
client_channel_install(${_module_name} ${FREERDP_ADDIN_PATH})
@ -222,7 +232,7 @@ endmacro(add_channel_client_subsystem_library)
macro(add_channel_server_library _module_prefix _module_name _channel_name _dynamic _entry)
set(_lnk_dir ${${_module_prefix}_LINK_DIRS})
if (NOT "${_lnk_dir}" STREQUAL "")
if(NOT "${_lnk_dir}" STREQUAL "")
link_directories(${_lnk_dir})
endif()
@ -234,7 +244,7 @@ macro(add_channel_server_library _module_prefix _module_name _channel_name _dyna
add_library(${_module_name} OBJECT ${${_module_prefix}_SRCS})
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server")
if (${_module_prefix}_LIBS)
if(${_module_prefix}_LIBS)
target_link_libraries(${_module_name} PUBLIC ${${_module_prefix}_LIBS})
endif()
server_channel_install(${_module_name} ${FREERDP_ADDIN_PATH})
@ -254,7 +264,7 @@ foreach(FILEPATH ${FILEPATHS})
endif()
endforeach()
if (NOT "${DRDYNVC_MATCH}" STREQUAL "")
if(NOT "${DRDYNVC_MATCH}" STREQUAL "")
list(REMOVE_ITEM FILEPATHS ${DRDYNVC_MATCH})
list(APPEND FILEPATHS ${DRDYNVC_MATCH})
list(REVERSE FILEPATHS) # list PREPEND is not available on old CMake3
@ -281,7 +291,7 @@ foreach(FILEPATH ${FILEPATHS})
endif()
endforeach(FILEPATH)
if (WITH_CHANNELS)
if(WITH_CHANNELS)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
set(FREERDP_CHANNELS_CLIENT_SRCS ${FREERDP_CHANNELS_CLIENT_SRCS} PARENT_SCOPE)

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "ainput" TYPE "dynamic"
DESCRIPTION "Advanced Input Virtual Channel Extension"
SPECIFICATIONS "[XXXXX]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"ainput"
TYPE
"dynamic"
DESCRIPTION
"Advanced Input Virtual Channel Extension"
SPECIFICATIONS
"[XXXXX]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -18,14 +18,9 @@
define_channel_client("ainput")
set(${MODULE_PREFIX}_SRCS
ainput_main.c
ainput_main.h
)
set(${MODULE_PREFIX}_SRCS ainput_main.c ainput_main.h)
set(${MODULE_PREFIX}_LIBS
winpr
)
set(${MODULE_PREFIX}_LIBS winpr)
include_directories(..)

View File

@ -18,11 +18,7 @@
define_channel_server("ainput")
set(${MODULE_PREFIX}_SRCS
ainput_main.c
)
set(${MODULE_PREFIX}_SRCS ainput_main.c)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")

View File

@ -1,4 +1,3 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
@ -7,11 +6,18 @@ if(ANDROID)
set(OPTION_SERVER_DEFAULT OFF)
endif()
define_channel_options(NAME "audin" TYPE "dynamic"
DESCRIPTION "Audio Input Redirection Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEAI]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"audin"
TYPE
"dynamic"
DESCRIPTION
"Audio Input Redirection Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEAI]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,14 +17,9 @@
define_channel_client("audin")
set(${MODULE_PREFIX}_SRCS
audin_main.c
audin_main.h
)
set(${MODULE_PREFIX}_SRCS audin_main.c audin_main.h)
set(${MODULE_PREFIX}_LIBS
freerdp winpr
)
set(${MODULE_PREFIX}_LIBS freerdp winpr)
include_directories(..)
@ -60,4 +55,4 @@ endif()
if(WITH_IOSAUDIO)
add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "ios" "")
endif()
endif()

View File

@ -19,15 +19,9 @@ define_channel_client_subsystem("audin" "alsa" "")
find_package(ALSA REQUIRED)
set(${MODULE_PREFIX}_SRCS
audin_alsa.c
)
set(${MODULE_PREFIX}_SRCS audin_alsa.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${ALSA_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${ALSA_LIBRARIES})
include_directories(..)
include_directories(SYSTEM ${ALSA_INCLUDE_DIRS})

View File

@ -1,37 +1,29 @@
# FreeRDP: A Remote Desktop Protocol Implementation
# FreeRDP cmake build script
#
# Copyright (c) 2015 Armin Novak <armin.novak@thincast.com>
# Copyright (c) 2015 Thincast Technologies GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# FreeRDP cmake build script
#
# Copyright (c) 2015 Armin Novak <armin.novak@thincast.com>
# Copyright (c) 2015 Thincast Technologies GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
define_channel_client_subsystem("audin" "ios" "")
FIND_LIBRARY(CORE_AUDIO CoreAudio)
FIND_LIBRARY(AVFOUNDATION AVFoundation)
FIND_LIBRARY(AUDIO_TOOL AudioToolbox)
define_channel_client_subsystem("audin" "ios" "")
find_library(CORE_AUDIO CoreAudio)
find_library(AVFOUNDATION AVFoundation)
find_library(AUDIO_TOOL AudioToolbox)
set(${MODULE_PREFIX}_SRCS
audin_ios.m
)
set(${MODULE_PREFIX}_SRCS audin_ios.m)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${AVFOUNDATION}
${CORE_AUDIO}
${AUDIO_TOOL}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${AVFOUNDATION} ${CORE_AUDIO} ${AUDIO_TOOL})
include_directories(..)
include_directories(SYSTEM ${MAC_INCLUDE_DIRS})

View File

@ -17,23 +17,14 @@
# limitations under the License.
define_channel_client_subsystem("audin" "mac" "")
FIND_LIBRARY(CORE_AUDIO CoreAudio)
FIND_LIBRARY(AVFOUNDATION AVFoundation)
FIND_LIBRARY(AUDIO_TOOL AudioToolbox)
FIND_LIBRARY(APP_SERVICES ApplicationServices)
find_library(CORE_AUDIO CoreAudio)
find_library(AVFOUNDATION AVFoundation)
find_library(AUDIO_TOOL AudioToolbox)
find_library(APP_SERVICES ApplicationServices)
set(${MODULE_PREFIX}_SRCS
audin_mac.m
)
set(${MODULE_PREFIX}_SRCS audin_mac.m)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${AVFOUNDATION}
${CORE_AUDIO}
${AUDIO_TOOL}
${APP_SERVICES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${AVFOUNDATION} ${CORE_AUDIO} ${AUDIO_TOOL} ${APP_SERVICES})
include_directories(..)
include_directories(SYSTEM ${MAC_INCLUDE_DIRS})

View File

@ -19,16 +19,9 @@ define_channel_client_subsystem("audin" "opensles" "")
find_package(OpenSLES REQUIRED)
set(${MODULE_PREFIX}_SRCS
opensl_io.c
audin_opensl_es.c
)
set(${MODULE_PREFIX}_SRCS opensl_io.c audin_opensl_es.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${OpenSLES_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${OpenSLES_LIBRARIES})
include_directories(..)
include_directories(SYSTEM ${OpenSLES_INCLUDE_DIRS})

View File

@ -19,24 +19,13 @@ define_channel_client_subsystem("audin" "oss" "")
find_package(OSS REQUIRED)
set(${MODULE_PREFIX}_SRCS
audin_oss.c
)
set(${MODULE_PREFIX}_SRCS audin_oss.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${OSS_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${OSS_LIBRARIES})
include_directories(..)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(SYSTEM ${OSS_INCLUDE_DIRS})
cleaning_configure_file(
${CMAKE_SOURCE_DIR}/cmake/oss-includes.h.in
${CMAKE_CURRENT_BINARY_DIR}/oss-includes.h
@ONLY
)
cleaning_configure_file(${CMAKE_SOURCE_DIR}/cmake/oss-includes.h.in ${CMAKE_CURRENT_BINARY_DIR}/oss-includes.h @ONLY)
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")

View File

@ -19,15 +19,9 @@ define_channel_client_subsystem("audin" "pulse" "")
find_package(PulseAudio REQUIRED)
set(${MODULE_PREFIX}_SRCS
audin_pulse.c)
set(${MODULE_PREFIX}_SRCS audin_pulse.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${PULSEAUDIO_LIBRARY}
${PULSEAUDIO_MAINLOOP_LIBRARY}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${PULSEAUDIO_LIBRARY} ${PULSEAUDIO_MAINLOOP_LIBRARY})
include_directories(..)
include_directories(SYSTEM ${PULSEAUDIO_INCLUDE_DIR})

View File

@ -20,17 +20,11 @@ define_channel_client_subsystem("audin" "sndio" "")
find_package(SNDIO REQUIRED)
set(${MODULE_PREFIX}_SRCS
audin_sndio.c)
set(${MODULE_PREFIX}_SRCS audin_sndio.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${SNDIO_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${SNDIO_LIBRARIES})
include_directories(..)
include_directories(SYSTEM ${SNDIO_INCLUDE_DIRS})
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")

View File

@ -17,14 +17,9 @@
define_channel_client_subsystem("audin" "winmm" "")
set(${MODULE_PREFIX}_SRCS
audin_winmm.c)
set(${MODULE_PREFIX}_SRCS audin_winmm.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
winmm.lib
)
set(${MODULE_PREFIX}_LIBS winpr freerdp winmm.lib)
include_directories(..)

View File

@ -17,11 +17,7 @@
define_channel_server("audin")
set(${MODULE_PREFIX}_SRCS
audin.c
)
set(${MODULE_PREFIX}_SRCS audin.c)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")

View File

@ -21,11 +21,9 @@ set(MODULE_NAME "freerdp-channels-client")
set(MODULE_PREFIX "FREERDP_CHANNELS_CLIENT")
set(${MODULE_PREFIX}_SRCS
${CMAKE_CURRENT_BINARY_DIR}/tables.c
${CMAKE_CURRENT_SOURCE_DIR}/tables.h
${CMAKE_CURRENT_SOURCE_DIR}/addin.c
${CMAKE_CURRENT_SOURCE_DIR}/addin.h
${CMAKE_CURRENT_SOURCE_DIR}/generic_dynvc.c)
${CMAKE_CURRENT_BINARY_DIR}/tables.c ${CMAKE_CURRENT_SOURCE_DIR}/tables.h ${CMAKE_CURRENT_SOURCE_DIR}/addin.c
${CMAKE_CURRENT_SOURCE_DIR}/addin.h ${CMAKE_CURRENT_SOURCE_DIR}/generic_dynvc.c
)
if(CHANNEL_STATIC_CLIENT_ENTRIES)
list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES)
@ -47,7 +45,9 @@ foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
elseif(${ENTRY} MATCHES "DVCPluginEntry$")
set(ENTRY_POINT_IMPORT "extern UINT VCAPITYPE ${ENTRY_POINT_NAME}(IDRDYNVC_ENTRY_POINTS* pEntryPoints);")
elseif(${ENTRY} MATCHES "DeviceServiceEntry$")
set(ENTRY_POINT_IMPORT "extern UINT VCAPITYPE ${ENTRY_POINT_NAME}(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints);")
set(ENTRY_POINT_IMPORT
"extern UINT VCAPITYPE ${ENTRY_POINT_NAME}(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints);"
)
else()
set(ENTRY_POINT_IMPORT "extern UINT VCAPITYPE ${ENTRY_POINT_NAME}(void);")
endif()
@ -81,11 +81,15 @@ foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
set(CLIENT_STATIC_ENTRY_INITIALIZER ".cse")
endif()
string(APPEND CLIENT_STATIC_ENTRY_TABLES "\nextern const ${CLIENT_STATIC_ENTRY_TYPE} CLIENT_${STATIC_ENTRY}_TABLE[];\n")
string(APPEND CLIENT_STATIC_ENTRY_TABLES
"\nextern const ${CLIENT_STATIC_ENTRY_TYPE} CLIENT_${STATIC_ENTRY}_TABLE[];\n"
)
string(APPEND CLIENT_STATIC_ENTRY_TABLES "const ${CLIENT_STATIC_ENTRY_TYPE} CLIENT_${STATIC_ENTRY}_TABLE[] =\n{")
string(APPEND CLIENT_STATIC_ENTRY_TABLES "\n${${STATIC_ENTRY}_TABLE}")
string(APPEND CLIENT_STATIC_ENTRY_TABLES "\n\t{ NULL, NULL }\n};")
string(APPEND CLIENT_STATIC_ENTRY_TABLES_LIST "\n\t{ \"${STATIC_ENTRY}\", { ${CLIENT_STATIC_ENTRY_INITIALIZER} = CLIENT_${STATIC_ENTRY}_TABLE } },")
string(APPEND CLIENT_STATIC_ENTRY_TABLES_LIST
"\n\t{ \"${STATIC_ENTRY}\", { ${CLIENT_STATIC_ENTRY_INITIALIZER} = CLIENT_${STATIC_ENTRY}_TABLE } },"
)
endforeach()
string(APPEND CLIENT_STATIC_ENTRY_TABLES_LIST "\n\t{ NULL, { .cse = NULL } }\n};")
@ -97,7 +101,9 @@ foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
set(STATIC_MODULE_NAME ${${STATIC_MODULE}_CLIENT_NAME})
set(STATIC_MODULE_CHANNEL ${${STATIC_MODULE}_CLIENT_CHANNEL})
string(TOUPPER "CLIENT_${STATIC_MODULE_CHANNEL}_SUBSYSTEM_TABLE" SUBSYSTEM_TABLE_NAME)
set(SUBSYSTEM_TABLE "extern const STATIC_SUBSYSTEM_ENTRY ${SUBSYSTEM_TABLE_NAME}[];\nconst STATIC_SUBSYSTEM_ENTRY ${SUBSYSTEM_TABLE_NAME}[] =\n{")
set(SUBSYSTEM_TABLE
"extern const STATIC_SUBSYSTEM_ENTRY ${SUBSYSTEM_TABLE_NAME}[];\nconst STATIC_SUBSYSTEM_ENTRY ${SUBSYSTEM_TABLE_NAME}[] =\n{"
)
get_target_property(CHANNEL_SUBSYSTEMS ${STATIC_MODULE_NAME} SUBSYSTEMS)
if(CHANNEL_SUBSYSTEMS MATCHES "NOTFOUND")
set(CHANNEL_SUBSYSTEMS "")
@ -114,11 +120,15 @@ foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
set(SUBSYSTEM_MODULE_NAME "${STATIC_MODULE_NAME}-${STATIC_SUBSYSTEM}")
list(APPEND ${MODULE_PREFIX}_LIBS ${SUBSYSTEM_MODULE_NAME})
if(_type_length GREATER 0)
set(STATIC_SUBSYSTEM_ENTRY "${STATIC_SUBSYSTEM_NAME}_freerdp_${STATIC_MODULE_CHANNEL}_client_${STATIC_SUBSYSTEM_TYPE}_subsystem_entry")
set(STATIC_SUBSYSTEM_ENTRY
"${STATIC_SUBSYSTEM_NAME}_freerdp_${STATIC_MODULE_CHANNEL}_client_${STATIC_SUBSYSTEM_TYPE}_subsystem_entry"
)
else()
set(STATIC_SUBSYSTEM_ENTRY "${STATIC_SUBSYSTEM_NAME}_freerdp_${STATIC_MODULE_CHANNEL}_client_subsystem_entry")
endif()
string(APPEND SUBSYSTEM_TABLE "\n\t{ \"${STATIC_SUBSYSTEM_NAME}\", \"${STATIC_SUBSYSTEM_TYPE}\", ${STATIC_SUBSYSTEM_ENTRY} },")
string(APPEND SUBSYSTEM_TABLE
"\n\t{ \"${STATIC_SUBSYSTEM_NAME}\", \"${STATIC_SUBSYSTEM_TYPE}\", ${STATIC_SUBSYSTEM_ENTRY} },"
)
set(SUBSYSTEM_IMPORT "extern UINT VCAPITYPE ${STATIC_SUBSYSTEM_ENTRY}(void*);")
string(APPEND CLIENT_STATIC_SUBSYSTEM_IMPORTS "\n${SUBSYSTEM_IMPORT}")
endforeach()
@ -126,7 +136,7 @@ foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
string(APPEND CLIENT_STATIC_SUBSYSTEM_TABLES "\n${SUBSYSTEM_TABLE}")
foreach(ENTRY ${${STATIC_MODULE}_CLIENT_ENTRY})
set (ENTRY_POINT_NAME ${STATIC_MODULE_CHANNEL}_${ENTRY})
set(ENTRY_POINT_NAME ${STATIC_MODULE_CHANNEL}_${ENTRY})
if(${ENTRY} STREQUAL "VirtualChannelEntry")
set(ENTRY_INITIALIZER ".csevc")
elseif(${ENTRY} STREQUAL "VirtualChannelEntryEx")
@ -138,7 +148,11 @@ foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
else()
set(ENTRY_INITIALIZER ".cse")
endif()
string(APPEND CLIENT_STATIC_ADDIN_TABLE "\n\t{ \"${STATIC_MODULE_CHANNEL}\", \"${ENTRY}\", { ${ENTRY_INITIALIZER} = ${ENTRY_POINT_NAME} }, ${SUBSYSTEM_TABLE_NAME} },")
string(
APPEND
CLIENT_STATIC_ADDIN_TABLE
"\n\t{ \"${STATIC_MODULE_CHANNEL}\", \"${ENTRY}\", { ${ENTRY_INITIALIZER} = ${ENTRY_POINT_NAME} }, ${SUBSYSTEM_TABLE_NAME} },"
)
endforeach()
endforeach()
string(APPEND CLIENT_STATIC_ADDIN_TABLE "\n\t{ NULL, NULL, { .cse = NULL }, NULL }\n};")

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "cliprdr" TYPE "static"
DESCRIPTION "Clipboard Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPECLIP]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"cliprdr"
TYPE
"static"
DESCRIPTION
"Clipboard Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPECLIP]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,16 +17,9 @@
define_channel_client("cliprdr")
set(${MODULE_PREFIX}_SRCS
cliprdr_format.c
cliprdr_format.h
cliprdr_main.c
cliprdr_main.h
../cliprdr_common.h
set(${MODULE_PREFIX}_SRCS cliprdr_format.c cliprdr_format.h cliprdr_main.c cliprdr_main.h ../cliprdr_common.h
../cliprdr_common.c
)
set(${MODULE_PREFIX}_LIBS
winpr freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx")

View File

@ -17,14 +17,7 @@
define_channel_server("cliprdr")
set(${MODULE_PREFIX}_SRCS
cliprdr_main.c
cliprdr_main.h
../cliprdr_common.h
../cliprdr_common.c
)
set(${MODULE_PREFIX}_SRCS cliprdr_main.c cliprdr_main.h ../cliprdr_common.h ../cliprdr_common.c)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")

View File

@ -1,12 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "disp" TYPE "dynamic"
DESCRIPTION "Display Update Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEDISP]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"disp"
TYPE
"dynamic"
DESCRIPTION
"Display Update Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEDISP]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,16 +17,9 @@
define_channel_client("disp")
set(${MODULE_PREFIX}_SRCS
disp_main.c
disp_main.h
../disp_common.c
../disp_common.h
)
set(${MODULE_PREFIX}_SRCS disp_main.c disp_main.h ../disp_common.c ../disp_common.h)
set(${MODULE_PREFIX}_LIBS
winpr
)
set(${MODULE_PREFIX}_LIBS winpr)
include_directories(..)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")

View File

@ -17,16 +17,9 @@
define_channel_server("disp")
set(${MODULE_PREFIX}_SRCS
disp_main.c
disp_main.h
../disp_common.c
../disp_common.h
)
set(${MODULE_PREFIX}_SRCS disp_main.c disp_main.h ../disp_common.c ../disp_common.h)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
include_directories(..)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "drdynvc" TYPE "static"
DESCRIPTION "Dynamic Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEDYC]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"drdynvc"
TYPE
"static"
DESCRIPTION
"Dynamic Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEDYC]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,9 +17,6 @@
define_channel_client("drdynvc")
set(${MODULE_PREFIX}_SRCS
drdynvc_main.c
drdynvc_main.h
)
set(${MODULE_PREFIX}_SRCS drdynvc_main.c drdynvc_main.h)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx")

View File

@ -17,12 +17,7 @@
define_channel_server("drdynvc")
set(${MODULE_PREFIX}_SRCS
drdynvc_main.c
drdynvc_main.h
)
set(${MODULE_PREFIX}_SRCS drdynvc_main.c drdynvc_main.h)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")

View File

@ -20,4 +20,3 @@ define_channel("drive")
if(WITH_CLIENT_CHANNELS)
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT OFF)
define_channel_options(NAME "drive" TYPE "device"
DESCRIPTION "Drive Redirection Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEFS]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"drive"
TYPE
"device"
DESCRIPTION
"Drive Redirection Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEFS]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,13 +17,7 @@
define_channel_client("drive")
set(${MODULE_PREFIX}_SRCS
drive_file.c
drive_file.h
drive_main.c
)
set(${MODULE_PREFIX}_SRCS drive_file.c drive_file.h drive_main.c)
set(${MODULE_PREFIX}_LIBS
winpr freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry")

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "echo" TYPE "dynamic"
DESCRIPTION "Echo Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEECO]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"echo"
TYPE
"dynamic"
DESCRIPTION
"Echo Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEECO]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,14 +17,9 @@
define_channel_client("echo")
set(${MODULE_PREFIX}_SRCS
echo_main.c
echo_main.h
)
set(${MODULE_PREFIX}_SRCS echo_main.c echo_main.h)
set(${MODULE_PREFIX}_LIBS
winpr
)
set(${MODULE_PREFIX}_LIBS winpr)
include_directories(..)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")

View File

@ -17,11 +17,7 @@
define_channel_server("echo")
set(${MODULE_PREFIX}_SRCS
echo_main.c
)
set(${MODULE_PREFIX}_SRCS echo_main.c)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "encomsp" TYPE "static"
DESCRIPTION "Multiparty Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEMC]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"encomsp"
TYPE
"static"
DESCRIPTION
"Multiparty Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEMC]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -19,9 +19,6 @@ define_channel_client("encomsp")
include_directories(..)
set(${MODULE_PREFIX}_SRCS
encomsp_main.c
encomsp_main.h
)
set(${MODULE_PREFIX}_SRCS encomsp_main.c encomsp_main.h)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx")

View File

@ -19,12 +19,7 @@ define_channel_server("encomsp")
include_directories(..)
set(${MODULE_PREFIX}_SRCS
encomsp_main.c
encomsp_main.h
)
set(${MODULE_PREFIX}_SRCS encomsp_main.c encomsp_main.h)
set(${MODULE_PREFIX}_LIBS
winpr
)
set(${MODULE_PREFIX}_LIBS winpr)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")

View File

@ -1,11 +1,18 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT OFF)
define_channel_options(NAME "geometry" TYPE "dynamic"
DESCRIPTION "Geometry tracking Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEGT]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"geometry"
TYPE
"dynamic"
DESCRIPTION
"Geometry tracking Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEGT]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})

View File

@ -17,14 +17,9 @@
define_channel_client("geometry")
set(${MODULE_PREFIX}_SRCS
geometry_main.c
geometry_main.h
)
set(${MODULE_PREFIX}_SRCS geometry_main.c geometry_main.h)
set(${MODULE_PREFIX}_LIBS
winpr
)
set(${MODULE_PREFIX}_LIBS winpr)
include_directories(..)

View File

@ -3,10 +3,18 @@ if(WITH_CHANNEL_GFXREDIR)
set(OPTION_CLIENT_DEFAULT OFF)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "gfxredir" TYPE "dynamic"
DESCRIPTION "Graphics Redirection Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPXXXX]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"gfxredir"
TYPE
"dynamic"
DESCRIPTION
"Graphics Redirection Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPXXXX]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_server_options(${OPTION_SERVER_DEFAULT})
endif()

View File

@ -17,16 +17,9 @@
define_channel_server("gfxredir")
set(${MODULE_PREFIX}_SRCS
gfxredir_main.c
gfxredir_main.h
../gfxredir_common.c
../gfxredir_common.h
)
set(${MODULE_PREFIX}_SRCS gfxredir_main.c gfxredir_main.h ../gfxredir_common.c ../gfxredir_common.h)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
include_directories(..)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT ON)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "location" TYPE "dynamic"
DESCRIPTION "Location Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEL]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"location"
TYPE
"dynamic"
DESCRIPTION
"Location Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEL]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -18,13 +18,9 @@
define_channel_client("location")
set(${MODULE_PREFIX}_SRCS
location_main.c
)
set(${MODULE_PREFIX}_SRCS location_main.c)
set(${MODULE_PREFIX}_LIBS
winpr
)
set(${MODULE_PREFIX}_LIBS winpr)
include_directories(..)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")

View File

@ -17,12 +17,8 @@
define_channel_server("location")
set(${MODULE_PREFIX}_SRCS
location_main.c
)
set(${MODULE_PREFIX}_SRCS location_main.c)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")

View File

@ -1,4 +1,3 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT OFF)
@ -21,11 +20,18 @@ if(ANDROID)
message("Serial redirection not supported on android")
endif()
define_channel_options(NAME "parallel" TYPE "device"
DESCRIPTION "Parallel Port Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPESP]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"parallel"
TYPE
"device"
DESCRIPTION
"Parallel Port Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPESP]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,11 +17,7 @@
define_channel_client("parallel")
set(${MODULE_PREFIX}_SRCS
parallel_main.c
)
set(${MODULE_PREFIX}_SRCS parallel_main.c)
set(${MODULE_PREFIX}_LIBS
winpr freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry")

View File

@ -1,4 +1,3 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT OFF)
@ -8,7 +7,7 @@ if(WIN32)
set(OPTION_SERVER_DEFAULT OFF)
else()
# cups is available on mac os and linux by default, on android it is optional.
if (NOT IOS AND NOT ANDROID)
if(NOT IOS AND NOT ANDROID)
set(CUPS_DEFAULT ON)
else()
set(CUPS_DEFAULT OFF)
@ -23,11 +22,18 @@ else()
endif()
endif()
define_channel_options(NAME "printer" TYPE "device"
DESCRIPTION "Print Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEPC]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"printer"
TYPE
"device"
DESCRIPTION
"Print Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEPC]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,13 +17,9 @@
define_channel_client("printer")
set(${MODULE_PREFIX}_SRCS
printer_main.c
)
set(${MODULE_PREFIX}_SRCS printer_main.c)
set(${MODULE_PREFIX}_LIBS
winpr freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry")
if(WITH_CUPS)

View File

@ -18,14 +18,9 @@
define_channel_client_subsystem("printer" "cups" "")
find_package(Cups 2.0 REQUIRED)
set(${MODULE_PREFIX}_SRCS
printer_cups.c)
set(${MODULE_PREFIX}_SRCS printer_cups.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${CUPS_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${CUPS_LIBRARIES})
include_directories(..)
include_directories(SYSTEM ${CUPS_INCLUDE_DIRS})

View File

@ -17,13 +17,9 @@
# limitations under the License.
define_channel_client_subsystem("printer" "win" "")
set(${MODULE_PREFIX}_SRCS
printer_win.c)
set(${MODULE_PREFIX}_SRCS printer_win.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
include_directories(..)

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "rail" TYPE "static"
DESCRIPTION "Remote Programs Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPERP]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rail"
TYPE
"static"
DESCRIPTION
"Remote Programs Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPERP]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -27,7 +27,5 @@ set(${MODULE_PREFIX}_SRCS
rail_orders.h
)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx")

View File

@ -17,16 +17,9 @@
define_channel_server("rail")
set(${MODULE_PREFIX}_SRCS
../rail_common.c
../rail_common.h
rail_main.c
rail_main.h
)
set(${MODULE_PREFIX}_SRCS ../rail_common.c ../rail_common.h rail_main.c rail_main.h)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
include_directories(..)

View File

@ -2,9 +2,16 @@ set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT OFF)
define_channel_options(NAME "rdp2tcp" TYPE "static"
DESCRIPTION "Tunneling TCP over RDP"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rdp2tcp"
TYPE
"static"
DESCRIPTION
"Tunneling TCP over RDP"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,11 +17,7 @@
define_channel_client("rdp2tcp")
set(${MODULE_PREFIX}_SRCS
rdp2tcp_main.c
)
set(${MODULE_PREFIX}_SRCS rdp2tcp_main.c)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "VirtualChannelEntryEx")

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "rdpdr" TYPE "static"
DESCRIPTION "Device Redirection Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEFS] [MS-RDPEPC] [MS-RDPESC] [MS-RDPESP]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rdpdr"
TYPE
"static"
DESCRIPTION
"Device Redirection Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEFS] [MS-RDPEPC] [MS-RDPESC] [MS-RDPESP]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -19,9 +19,9 @@
define_channel_client("rdpdr")
include (CheckFunctionExists)
include(CheckFunctionExists)
check_function_exists(getmntent_r FREERDP_HAVE_GETMNTENT_R)
if (FREERDP_HAVE_GETMNTENT_R)
if(FREERDP_HAVE_GETMNTENT_R)
add_definitions(-DFREERDP_HAVE_GETMNTENT_R)
endif()
@ -36,13 +36,9 @@ set(${MODULE_PREFIX}_SRCS
rdpdr_capabilities.h
)
set(${MODULE_PREFIX}_LIBS
winpr freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
if(APPLE AND (NOT IOS))
find_library(CORESERVICES_LIBRARY CoreServices)
list(APPEND ${MODULE_PREFIX}_LIBS
${CORESERVICES_LIBRARY}
)
list(APPEND ${MODULE_PREFIX}_LIBS ${CORESERVICES_LIBRARY})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx")

View File

@ -17,13 +17,8 @@
define_channel_server("rdpdr")
set(${MODULE_PREFIX}_SRCS
rdpdr_main.c
rdpdr_main.h
)
set(${MODULE_PREFIX}_SRCS rdpdr_main.c rdpdr_main.h)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")

View File

@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if (NOT IOS AND NOT WIN32 AND NOT ANDROID)
if(NOT IOS AND NOT WIN32 AND NOT ANDROID)
find_package(KRB5)
if(KRB5_FOUND)

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT OFF)
set(OPTION_SERVER_DEFAULT OFF)
define_channel_options(NAME "rdpear" TYPE "dynamic"
DESCRIPTION "Authentication redirection Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEAR]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rdpear"
TYPE
"dynamic"
DESCRIPTION
"Authentication redirection Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEAR]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,15 +17,8 @@
define_channel_client("rdpear")
set(${MODULE_PREFIX}_SRCS
rdpear_main.c
)
set(${MODULE_PREFIX}_SRCS rdpear_main.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
rdpear-common
)
set(${MODULE_PREFIX}_LIBS winpr freerdp rdpear-common)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")

View File

@ -16,43 +16,22 @@
# limitations under the License.
add_library(rdpear-common INTERFACE)
add_library(rdpear-common-obj OBJECT
ndr.c
rdpear_asn1.c
rdpear_common.c
rdpear-common/ndr.h
rdpear-common/rdpear_asn1.h
add_library(
rdpear-common-obj OBJECT ndr.c rdpear_asn1.c rdpear_common.c rdpear-common/ndr.h rdpear-common/rdpear_asn1.h
rdpear-common/rdpear_common.h
)
target_include_directories(rdpear-common
SYSTEM
INTERFACE ${KRB5_INCLUDE_DIRS}
)
target_compile_options(rdpear-common
INTERFACE
${KRB5_CFLAGS}
)
target_link_options(rdpear-common
INTERFACE
${KRB5_LDFLAGS}
)
target_include_directories(rdpear-common SYSTEM INTERFACE ${KRB5_INCLUDE_DIRS})
target_compile_options(rdpear-common INTERFACE ${KRB5_CFLAGS})
target_link_options(rdpear-common INTERFACE ${KRB5_LDFLAGS})
target_include_directories(rdpear-common-obj
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(rdpear-common-obj
SYSTEM
PRIVATE ${KRB5_INCLUDE_DIRS}
)
target_include_directories(rdpear-common-obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(rdpear-common-obj SYSTEM PRIVATE ${KRB5_INCLUDE_DIRS})
target_link_directories(rdpear-common INTERFACE ${KRB5_LIBRARY_DIRS})
target_link_libraries(rdpear-common INTERFACE
${KRB5_LIBRARIES}
$<TARGET_OBJECTS:rdpear-common-obj>
)
target_link_libraries(rdpear-common INTERFACE ${KRB5_LIBRARIES} $<TARGET_OBJECTS:rdpear-common-obj>)
channel_install(rdpear-common ${FREERDP_ADDIN_PATH} "FreeRDPTargets")
if (BUILD_TESTING_INTERNAL OR BUILD_TESTING)
if(BUILD_TESTING_INTERNAL OR BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -1,4 +1,3 @@
set(MODULE_NAME "TestRdpear")
set(MODULE_PREFIX "TEST_RDPEAR")
@ -6,20 +5,13 @@ set(TEST_RDPEAR_DRIVER TestRdpear.c)
disable_warnings_for_directory(${CMAKE_CURRENT_BINARY_DIR})
set(TEST_RDPEAR_TESTS
TestNdr.c
)
set(TEST_RDPEAR_TESTS TestNdr.c)
if (BUILD_TESTING_INTERNAL)
list(APPEND TEST_RDPEAR_TESTS
TestNdrEar.c
)
if(BUILD_TESTING_INTERNAL)
list(APPEND TEST_RDPEAR_TESTS TestNdrEar.c)
endif()
create_test_sourcelist(TEST_RDPEAR_SRCS
TestRdpear.c
${TEST_RDPEAR_TESTS}
)
create_test_sourcelist(TEST_RDPEAR_SRCS TestRdpear.c ${TEST_RDPEAR_TESTS})
add_executable(${MODULE_NAME} ${TEST_RDPEAR_SRCS})
@ -28,7 +20,6 @@ add_definitions(-DTESTING_SRC_DIRECTORY="${PROJECT_SOURCE_DIR}")
target_link_libraries(${MODULE_NAME} freerdp winpr freerdp-client)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
foreach(test ${${MODULE_PREFIX}_TESTS})
@ -37,4 +28,3 @@ foreach(test ${${MODULE_PREFIX}_TESTS})
endforeach()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/Rdpear/Test")

View File

@ -23,7 +23,7 @@ endif()
if(WITH_CLIENT_CHANNELS)
option(RDPECAM_CLIENT_CHANNEL_STUB "Only build [MS-RDPECAM] channel stub" OFF)
if (NOT RDPECAM_CLIENT_CHANNEL_STUB)
if(NOT RDPECAM_CLIENT_CHANNEL_STUB)
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()
endif()

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT ON)
set(OPTION_CLIENT_DEFAULT OFF)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "rdpecam" TYPE "dynamic"
DESCRIPTION "Video Capture Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPECAM]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rdpecam"
TYPE
"dynamic"
DESCRIPTION
"Video Capture Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPECAM]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_server_options(${OPTION_SERVER_DEFAULT})
define_channel_client_options(${OPTION_CLIENT_DEFAULT})

View File

@ -43,18 +43,9 @@ endif()
include_directories(SYSTEM ${SWSCALE_INCLUDE_DIRS})
set(${MODULE_PREFIX}_SRCS
camera_device_enum_main.c
camera_device_main.c
encoding.c
)
set(${MODULE_PREFIX}_SRCS camera_device_enum_main.c camera_device_main.c encoding.c)
set(${MODULE_PREFIX}_LIBS
freerdp
winpr
${SWSCALE_LIBRARIES}
${FFMPEG_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS freerdp winpr ${SWSCALE_LIBRARIES} ${FFMPEG_LIBRARIES})
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")

View File

@ -19,15 +19,9 @@ if(WITH_V4L)
define_channel_client_subsystem("rdpecam" "v4l" "")
set(${MODULE_PREFIX}_SRCS
camera_v4l.c
)
set(${MODULE_PREFIX}_SRCS camera_v4l.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${V4L_TARGETS}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${V4L_TARGETS})
include_directories(..)

View File

@ -17,13 +17,8 @@
define_channel_server("rdpecam")
set(${MODULE_PREFIX}_SRCS
camera_device_enumerator_main.c
camera_device_main.c
)
set(${MODULE_PREFIX}_SRCS camera_device_enumerator_main.c camera_device_main.c)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "rdpei" TYPE "dynamic"
DESCRIPTION "Input Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEI]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rdpei"
TYPE
"dynamic"
DESCRIPTION
"Input Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEI]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,17 +17,9 @@
define_channel_client("rdpei")
set(${MODULE_PREFIX}_SRCS
rdpei_main.c
rdpei_main.h
../rdpei_common.c
../rdpei_common.h
)
set(${MODULE_PREFIX}_SRCS rdpei_main.c rdpei_main.h ../rdpei_common.c ../rdpei_common.h)
set(${MODULE_PREFIX}_LIBS
winpr freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
include_directories(..)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")

View File

@ -18,15 +18,8 @@
define_channel_server("rdpei")
set(${MODULE_PREFIX}_SRCS
rdpei_main.c
rdpei_main.h
../rdpei_common.c
../rdpei_common.h
)
set(${MODULE_PREFIX}_SRCS rdpei_main.c rdpei_main.h ../rdpei_common.c ../rdpei_common.h)
set(${MODULE_PREFIX}_LIBS
winpr
)
set(${MODULE_PREFIX}_LIBS winpr)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")

View File

@ -1,12 +1,18 @@
set(OPTION_DEFAULT ON)
set(OPTION_CLIENT_DEFAULT OFF)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "rdpemsc" TYPE "dynamic"
DESCRIPTION "Mouse Cursor Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEMSC]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rdpemsc"
TYPE
"dynamic"
DESCRIPTION
"Mouse Cursor Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEMSC]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,12 +17,8 @@
define_channel_server("rdpemsc")
set(${MODULE_PREFIX}_SRCS
mouse_cursor_main.c
)
set(${MODULE_PREFIX}_SRCS mouse_cursor_main.c)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "rdpgfx" TYPE "dynamic"
DESCRIPTION "Graphics Pipeline Extension"
SPECIFICATIONS "[MS-RDPEGFX]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rdpgfx"
TYPE
"dynamic"
DESCRIPTION
"Graphics Pipeline Extension"
SPECIFICATIONS
"[MS-RDPEGFX]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,19 +17,11 @@
define_channel_client("rdpgfx")
set(${MODULE_PREFIX}_SRCS
rdpgfx_main.c
rdpgfx_main.h
rdpgfx_codec.c
rdpgfx_codec.h
../rdpgfx_common.c
set(${MODULE_PREFIX}_SRCS rdpgfx_main.c rdpgfx_main.h rdpgfx_codec.c rdpgfx_codec.h ../rdpgfx_common.c
../rdpgfx_common.h
)
set(${MODULE_PREFIX}_LIBS
winpr freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
include_directories(..)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")

View File

@ -17,16 +17,9 @@
define_channel_server("rdpgfx")
set(${MODULE_PREFIX}_SRCS
rdpgfx_main.c
rdpgfx_main.h
../rdpgfx_common.c
../rdpgfx_common.h
)
set(${MODULE_PREFIX}_SRCS rdpgfx_main.c rdpgfx_main.h ../rdpgfx_common.c ../rdpgfx_common.h)
set(${MODULE_PREFIX}_LIBS
freerdp
)
set(${MODULE_PREFIX}_LIBS freerdp)
include_directories(..)

View File

@ -1,13 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "rdpsnd" TYPE "static;dynamic"
DESCRIPTION "Audio Output Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPEA]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"rdpsnd"
TYPE
"static;dynamic"
DESCRIPTION
"Audio Output Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPEA]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,17 +17,9 @@
define_channel_client("rdpsnd")
set(${MODULE_PREFIX}_SRCS
rdpsnd_main.c
rdpsnd_main.h
)
set(${MODULE_PREFIX}_SRCS rdpsnd_main.c rdpsnd_main.h)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${CMAKE_THREAD_LIBS_INIT}
rdpsnd-common
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${CMAKE_THREAD_LIBS_INIT} rdpsnd-common)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx;DVCPluginEntry")

View File

@ -19,14 +19,9 @@ define_channel_client_subsystem("rdpsnd" "alsa" "")
find_package(ALSA REQUIRED)
set(${MODULE_PREFIX}_SRCS
rdpsnd_alsa.c)
set(${MODULE_PREFIX}_SRCS rdpsnd_alsa.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${ALSA_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${ALSA_LIBRARIES})
include_directories(..)
include_directories(SYSTEM ${ALSA_INCLUDE_DIRS})

View File

@ -18,14 +18,9 @@
define_channel_client_subsystem("rdpsnd" "fake" "")
set(${MODULE_PREFIX}_SRCS
rdpsnd_fake.c
)
set(${MODULE_PREFIX}_SRCS rdpsnd_fake.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
include_directories(..)

View File

@ -19,21 +19,13 @@
define_channel_client_subsystem("rdpsnd" "ios" "")
FIND_LIBRARY(CORE_AUDIO CoreAudio)
FIND_LIBRARY(AUDIO_TOOL AudioToolbox)
FIND_LIBRARY(CORE_FOUNDATION CoreFoundation)
find_library(CORE_AUDIO CoreAudio)
find_library(AUDIO_TOOL AudioToolbox)
find_library(CORE_FOUNDATION CoreFoundation)
set(${MODULE_PREFIX}_SRCS
rdpsnd_ios.c
TPCircularBuffer.c)
set(${MODULE_PREFIX}_SRCS rdpsnd_ios.c TPCircularBuffer.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${AUDIO_TOOL}
${CORE_AUDIO}
${CORE_FOUNDATION}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${AUDIO_TOOL} ${CORE_AUDIO} ${CORE_FOUNDATION})
include_directories(..)

View File

@ -20,13 +20,12 @@
define_channel_client_subsystem("rdpsnd" "mac" "")
find_library(COCOA_LIBRARY Cocoa REQUIRED)
FIND_LIBRARY(CORE_FOUNDATION CoreFoundation)
FIND_LIBRARY(CORE_AUDIO CoreAudio REQUIRED)
FIND_LIBRARY(AUDIO_TOOL AudioToolbox REQUIRED)
FIND_LIBRARY(AV_FOUNDATION AVFoundation REQUIRED)
find_library(CORE_FOUNDATION CoreFoundation)
find_library(CORE_AUDIO CoreAudio REQUIRED)
find_library(AUDIO_TOOL AudioToolbox REQUIRED)
find_library(AV_FOUNDATION AVFoundation REQUIRED)
set(${MODULE_PREFIX}_SRCS
rdpsnd_mac.m)
set(${MODULE_PREFIX}_SRCS rdpsnd_mac.m)
set(${MODULE_PREFIX}_LIBS
winpr

View File

@ -19,15 +19,9 @@ define_channel_client_subsystem("rdpsnd" "opensles" "")
find_package(OpenSLES REQUIRED)
set(${MODULE_PREFIX}_SRCS
opensl_io.c
rdpsnd_opensles.c)
set(${MODULE_PREFIX}_SRCS opensl_io.c rdpsnd_opensles.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${OpenSLES_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${OpenSLES_LIBRARIES})
include_directories(..)
include_directories(SYSTEM ${OpenSLES_INCLUDE_DIRS})

View File

@ -19,23 +19,13 @@ define_channel_client_subsystem("rdpsnd" "oss" "")
find_package(OSS REQUIRED)
set(${MODULE_PREFIX}_SRCS
rdpsnd_oss.c
)
set(${MODULE_PREFIX}_SRCS rdpsnd_oss.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${OSS_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${OSS_LIBRARIES})
include_directories(..)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(SYSTEM ${OSS_INCLUDE_DIRS})
cleaning_configure_file(
${CMAKE_SOURCE_DIR}/cmake/oss-includes.h.in
${CMAKE_CURRENT_BINARY_DIR}/oss-includes.h
@ONLY
)
cleaning_configure_file(${CMAKE_SOURCE_DIR}/cmake/oss-includes.h.in ${CMAKE_CURRENT_BINARY_DIR}/oss-includes.h @ONLY)
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")

View File

@ -19,16 +19,9 @@ define_channel_client_subsystem("rdpsnd" "pulse" "")
find_package(PulseAudio REQUIRED)
set(${MODULE_PREFIX}_SRCS
rdpsnd_pulse.c
)
set(${MODULE_PREFIX}_SRCS rdpsnd_pulse.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${PULSEAUDIO_LIBRARY}
${PULSEAUDIO_MAINLOOP_LIBRARY}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${PULSEAUDIO_LIBRARY} ${PULSEAUDIO_MAINLOOP_LIBRARY})
include_directories(..)
include_directories(SYSTEM ${PULSEAUDIO_INCLUDE_DIR})

View File

@ -20,15 +20,9 @@ define_channel_client_subsystem("rdpsnd" "sndio" "")
find_package(SNDIO REQUIRED)
set(${MODULE_PREFIX}_SRCS
rdpsnd_sndio.c
)
set(${MODULE_PREFIX}_SRCS rdpsnd_sndio.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
${SNDIO_LIBRARIES}
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${SNDIO_LIBRARIES})
include_directories(..)
include_directories(SYSTEM ${SNDIO_INCLUDE_DIRS})

View File

@ -17,15 +17,9 @@
define_channel_client_subsystem("rdpsnd" "winmm" "")
set(${MODULE_PREFIX}_SRCS
rdpsnd_winmm.c
)
set(${MODULE_PREFIX}_SRCS rdpsnd_winmm.c)
set(${MODULE_PREFIX}_LIBS
winpr
freerdp
winmm.lib
)
set(${MODULE_PREFIX}_LIBS winpr freerdp winmm.lib)
include_directories(..)

View File

@ -16,12 +16,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(SRCS
rdpsnd_common.h
rdpsnd_common.c)
set(SRCS rdpsnd_common.h rdpsnd_common.c)
# Library currently header only
add_library(rdpsnd-common STATIC ${SRCS})
channel_install(rdpsnd-common ${FREERDP_ADDIN_PATH} "FreeRDPTargets")

View File

@ -17,13 +17,8 @@
define_channel_server("rdpsnd")
set(${MODULE_PREFIX}_SRCS
rdpsnd_main.c
rdpsnd_main.h
)
set(${MODULE_PREFIX}_SRCS rdpsnd_main.c rdpsnd_main.h)
set(${MODULE_PREFIX}_LIBS
rdpsnd-common
)
set(${MODULE_PREFIX}_LIBS rdpsnd-common)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")

View File

@ -1,12 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT ON)
define_channel_options(NAME "remdesk" TYPE "static"
DESCRIPTION "Remote Assistance Virtual Channel Extension"
SPECIFICATIONS "[MS-RA]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"remdesk"
TYPE
"static"
DESCRIPTION
"Remote Assistance Virtual Channel Extension"
SPECIFICATIONS
"[MS-RA]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,13 +17,8 @@
define_channel_client("remdesk")
set(${MODULE_PREFIX}_SRCS
remdesk_main.c
remdesk_main.h
)
set(${MODULE_PREFIX}_SRCS remdesk_main.c remdesk_main.h)
set(${MODULE_PREFIX}_LIBS
winpr freerdp remdesk-common
)
set(${MODULE_PREFIX}_LIBS winpr freerdp remdesk-common)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntryEx")

View File

@ -16,11 +16,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(SRCS
remdesk_common.h
remdesk_common.c)
set(SRCS remdesk_common.h remdesk_common.c)
add_library(remdesk-common STATIC ${SRCS})
channel_install(remdesk-common ${FREERDP_ADDIN_PATH} "FreeRDPTargets")

View File

@ -17,13 +17,8 @@
define_channel_server("remdesk")
set(${MODULE_PREFIX}_SRCS
remdesk_main.c
remdesk_main.h
)
set(${MODULE_PREFIX}_SRCS remdesk_main.c remdesk_main.h)
set(${MODULE_PREFIX}_LIBS
winpr remdesk-common
)
set(${MODULE_PREFIX}_LIBS winpr remdesk-common)
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")

View File

@ -20,4 +20,3 @@ define_channel("serial")
if(WITH_CLIENT_CHANNELS)
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -1,4 +1,3 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT OFF)
@ -15,17 +14,24 @@ if(ANDROID)
message("Serial redirection not supported on android")
endif()
if (APPLE)
if(APPLE)
set(OPTION_CLIENT_DEFAULT OFF)
set(OPTION_SERVER_DEFAULT OFF)
message("Serial redirection not supported on apple")
endif()
define_channel_options(NAME "serial" TYPE "device"
DESCRIPTION "Serial Port Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPESP]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"serial"
TYPE
"device"
DESCRIPTION
"Serial Port Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPESP]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,15 +17,11 @@
define_channel_client("serial")
set(${MODULE_PREFIX}_SRCS
serial_main.c
)
set(${MODULE_PREFIX}_SRCS serial_main.c)
set(${MODULE_PREFIX}_LIBS
winpr freerdp
)
set(${MODULE_PREFIX}_LIBS winpr freerdp)
# Serial implementation is currently linux only. BSD* might also work but untested
if (UNIX AND NOT APPLE AND NOT ANDROID)
if(UNIX AND NOT APPLE AND NOT ANDROID)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry")
endif()

View File

@ -18,9 +18,7 @@
set(MODULE_NAME "freerdp-channels-server")
set(MODULE_PREFIX "FREERDP_CHANNELS_SERVER")
set(${MODULE_PREFIX}_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/channels.c
${CMAKE_CURRENT_SOURCE_DIR}/channels.h)
set(${MODULE_PREFIX}_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/channels.c ${CMAKE_CURRENT_SOURCE_DIR}/channels.h)
foreach(STATIC_MODULE ${CHANNEL_STATIC_SERVER_MODULES})
set(STATIC_MODULE_NAME ${${STATIC_MODULE}_SERVER_NAME})

View File

@ -1,12 +1,19 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT ON)
set(OPTION_SERVER_DEFAULT OFF)
define_channel_options(NAME "smartcard" TYPE "device"
DESCRIPTION "Smart Card Virtual Channel Extension"
SPECIFICATIONS "[MS-RDPESC]"
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"smartcard"
TYPE
"device"
DESCRIPTION
"Smart Card Virtual Channel Extension"
SPECIFICATIONS
"[MS-RDPESC]"
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})
define_channel_server_options(${OPTION_SERVER_DEFAULT})

View File

@ -17,17 +17,10 @@
define_channel_client("smartcard")
set(${MODULE_PREFIX}_SRCS
smartcard_main.c
smartcard_main.h
)
set(${MODULE_PREFIX}_SRCS smartcard_main.c smartcard_main.h)
set(${MODULE_PREFIX}_LIBS
winpr freerdp ${OPENSSL_LIBRARIES}
)
if (WITH_SMARTCARD_EMULATE)
list(APPEND ${MODULE_PREFIX}_LIBS
ZLIB::ZLIB
)
set(${MODULE_PREFIX}_LIBS winpr freerdp ${OPENSSL_LIBRARIES})
if(WITH_SMARTCARD_EMULATE)
list(APPEND ${MODULE_PREFIX}_LIBS ZLIB::ZLIB)
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DeviceServiceEntry")

View File

@ -1,12 +1,18 @@
set(OPTION_DEFAULT OFF)
set(OPTION_CLIENT_DEFAULT OFF)
set(OPTION_SERVER_DEFAULT OFF)
define_channel_options(NAME "sshagent" TYPE "dynamic"
DESCRIPTION "SSH Agent Forwarding (experimental)"
SPECIFICATIONS ""
DEFAULT ${OPTION_DEFAULT})
define_channel_options(
NAME
"sshagent"
TYPE
"dynamic"
DESCRIPTION
"SSH Agent Forwarding (experimental)"
SPECIFICATIONS
""
DEFAULT
${OPTION_DEFAULT}
)
define_channel_client_options(${OPTION_CLIENT_DEFAULT})

View File

@ -18,14 +18,9 @@
define_channel_client("sshagent")
set(${MODULE_PREFIX}_SRCS
sshagent_main.c
sshagent_main.h
)
set(${MODULE_PREFIX}_SRCS sshagent_main.c sshagent_main.h)
set(${MODULE_PREFIX}_LIBS
winpr
)
set(${MODULE_PREFIX}_LIBS winpr)
include_directories(..)

Some files were not shown because too many files have changed in this diff Show More