channels: add automatic inclusion and bundling of built-in server channels

This commit is contained in:
Marc-André Moreau 2012-09-22 19:25:21 -04:00
parent 81974d1b2a
commit e4e85be15d
20 changed files with 152 additions and 46 deletions

View File

@ -1,9 +1,7 @@
# FreeRDP: A Remote Desktop Protocol Client # FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script # FreeRDP cmake build script
# #
# Copyright 2011 O.S. Systems Software Ltda. # Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -32,3 +30,5 @@ foreach(FILEPATH ${FILEPATHS})
endif() endif()
endforeach(FILEPATH) endforeach(FILEPATH)
add_subdirectory(server)

View File

@ -15,5 +15,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
set(MODULE_NAME "audin")
set(MODULE_PREFIX "CHANNEL_AUDIN")
add_subdirectory(client) add_subdirectory(client)
add_subdirectory(server)
set(${MODULE_PREFIX}_SERVER_SRCS ${${MODULE_PREFIX}_SERVER_SRCS} PARENT_SCOPE)
set(${MODULE_PREFIX}_SERVER_LIBS ${${MODULE_PREFIX}_SERVER_LIBS} PARENT_SCOPE)
set(CHANNEL_BUILTIN_SERVER_MODULES ${CHANNEL_BUILTIN_SERVER_MODULES} ${MODULE_NAME} PARENT_SCOPE)

View File

@ -0,0 +1,29 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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.
set(MODULE_PREFIX "CHANNEL_AUDIN_SERVER")
set(${MODULE_PREFIX}_SRCS
audin.c
PARENT_SCOPE)
if(WITH_MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS freerdp PARENT_SCOPE)
else()
set(${MODULE_PREFIX}_LIBS freerdp-utils PARENT_SCOPE)
endif()

View File

@ -15,5 +15,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
set(MODULE_NAME "rdpsnd")
set(MODULE_PREFIX "CHANNEL_RDPSND")
add_subdirectory(client) add_subdirectory(client)
add_subdirectory(server)
set(${MODULE_PREFIX}_SERVER_SRCS ${${MODULE_PREFIX}_SERVER_SRCS} PARENT_SCOPE)
set(${MODULE_PREFIX}_SERVER_LIBS ${${MODULE_PREFIX}_SERVER_LIBS} PARENT_SCOPE)
set(CHANNEL_BUILTIN_SERVER_MODULES ${CHANNEL_BUILTIN_SERVER_MODULES} ${MODULE_NAME} PARENT_SCOPE)

View File

@ -4,6 +4,8 @@ set(CHANNEL_SHORT_NAME "rdpsnd")
set(CHANNEL_LONG_NAME "Audio Output Virtual Channel Extension") set(CHANNEL_LONG_NAME "Audio Output Virtual Channel Extension")
set(CHANNEL_SPECIFICATIONS "[MS-RDPEA]") set(CHANNEL_SPECIFICATIONS "[MS-RDPEA]")
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
if(WIN32) if(WIN32)
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
else() else()

View File

@ -0,0 +1,29 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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.
set(MODULE_PREFIX "CHANNEL_RDPSND_SERVER")
set(${MODULE_PREFIX}_SRCS
rdpsnd.c
PARENT_SCOPE)
if(WITH_MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS freerdp PARENT_SCOPE)
else()
set(${MODULE_PREFIX}_LIBS freerdp-utils PARENT_SCOPE)
endif()

View File

@ -0,0 +1,35 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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.
foreach(MODULE_NAME ${CHANNEL_BUILTIN_SERVER_MODULES})
string(TOUPPER "CHANNEL_${MODULE_NAME}" MODULE_PREFIX)
message(STATUS "Adding built-in channel server module: ${MODULE_NAME}")
foreach(SRC ${${MODULE_PREFIX}_SERVER_SRCS})
set(CHANNEL_SERVER_SRCS ${CHANNEL_SERVER_SRCS} "../${MODULE_NAME}/server/${SRC}")
endforeach()
set(CHANNEL_SERVER_LIBS ${CHANNEL_SERVER_LIBS} ${${MODULE_PREFIX}_SERVER_LIBS})
endforeach()
add_library(freerdp-server ${CHANNEL_SERVER_SRCS})
set_target_properties(freerdp-server PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
target_link_libraries(freerdp-server ${CHANNEL_SERVER_LIBS})
install(TARGETS freerdp-server DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -0,0 +1,19 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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.
add_subdirectory(client)

View File

@ -20,7 +20,7 @@
#ifndef __TSMF_AUDIO_H #ifndef __TSMF_AUDIO_H
#define __TSMF_AUDIO_H #define __TSMF_AUDIO_H
#include "drdynvc_types.h" #include "tsmf_types.h"
typedef struct _ITSMFAudioDevice ITSMFAudioDevice; typedef struct _ITSMFAudioDevice ITSMFAudioDevice;

View File

@ -29,7 +29,6 @@
#include <freerdp/utils/stream.h> #include <freerdp/utils/stream.h>
#include <freerdp/utils/hexdump.h> #include <freerdp/utils/hexdump.h>
#include "drdynvc_types.h"
#include "tsmf_constants.h" #include "tsmf_constants.h"
#include "tsmf_types.h" #include "tsmf_types.h"

View File

@ -28,7 +28,6 @@
#include <freerdp/utils/memory.h> #include <freerdp/utils/memory.h>
#include <freerdp/utils/load_plugin.h> #include <freerdp/utils/load_plugin.h>
#include "drdynvc_types.h"
#include "tsmf_types.h" #include "tsmf_types.h"
#include "tsmf_constants.h" #include "tsmf_constants.h"
#include "tsmf_decoder.h" #include "tsmf_decoder.h"

View File

@ -21,7 +21,6 @@
#ifndef __TSMF_DECODER_H #ifndef __TSMF_DECODER_H
#define __TSMF_DECODER_H #define __TSMF_DECODER_H
#include "drdynvc_types.h"
#include "tsmf_types.h" #include "tsmf_types.h"
typedef enum _ITSMFControlMsg typedef enum _ITSMFControlMsg

View File

@ -29,7 +29,7 @@
#include <freerdp/utils/memory.h> #include <freerdp/utils/memory.h>
#include <freerdp/utils/stream.h> #include <freerdp/utils/stream.h>
#include "drdynvc_types.h" #include "tsmf_types.h"
#include "tsmf_constants.h" #include "tsmf_constants.h"
#include "tsmf_media.h" #include "tsmf_media.h"
#include "tsmf_codec.h" #include "tsmf_codec.h"

View File

@ -28,7 +28,7 @@
#include <freerdp/utils/memory.h> #include <freerdp/utils/memory.h>
#include <freerdp/utils/stream.h> #include <freerdp/utils/stream.h>
#include "drdynvc_types.h" #include "tsmf_types.h"
#include "tsmf_constants.h" #include "tsmf_constants.h"
#include "tsmf_ifman.h" #include "tsmf_ifman.h"
#include "tsmf_media.h" #include "tsmf_media.h"

View File

@ -45,7 +45,6 @@
#include <winpr/synch.h> #include <winpr/synch.h>
#include "drdynvc_types.h"
#include "tsmf_constants.h" #include "tsmf_constants.h"
#include "tsmf_types.h" #include "tsmf_types.h"
#include "tsmf_decoder.h" #include "tsmf_decoder.h"

View File

@ -20,7 +20,19 @@
#ifndef __TSMF_TYPES_H #ifndef __TSMF_TYPES_H
#define __TSMF_TYPES_H #define __TSMF_TYPES_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <freerdp/dvc.h>
#include <freerdp/types.h> #include <freerdp/types.h>
#include <freerdp/utils/debug.h>
#ifdef WITH_DEBUG_DVC
#define DEBUG_DVC(fmt, ...) DEBUG_CLASS(DVC, fmt, ## __VA_ARGS__)
#else
#define DEBUG_DVC(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
#endif
typedef struct _TS_AM_MEDIA_TYPE typedef struct _TS_AM_MEDIA_TYPE
{ {

View File

@ -33,5 +33,3 @@ else()
add_subdirectory(Windows) add_subdirectory(Windows)
endif() endif()
# Build Server Channels library
add_subdirectory(channels)

View File

@ -1,34 +0,0 @@
# FreeRDP: A Remote Desktop Protocol Client
# libfreerdp-server-channels cmake build script
#
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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.
set(FREERDP_SERVER_CHANNELS_SRCS
audin.c
rdpsnd.c)
add_library(freerdp-server-channels ${FREERDP_SERVER_CHANNELS_SRCS})
set_target_properties(freerdp-server-channels PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
if(WITH_MONOLITHIC_BUILD)
target_link_libraries(freerdp-server-channels freerdp)
else()
target_link_libraries(freerdp-server-channels freerdp-channels freerdp-utils)
endif()
install(TARGETS freerdp-server-channels DESTINATION ${CMAKE_INSTALL_LIBDIR})