channels: fix linking of libfreerdp-client and libfreerdp-server
This commit is contained in:
parent
d251538252
commit
210ba6ac8c
@ -67,7 +67,7 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED EXPORT_ALL_SYMBOLS)
|
||||
set(EXPORT_ALL_SYMBOLS TRUE)
|
||||
set(EXPORT_ALL_SYMBOLS FALSE)
|
||||
endif()
|
||||
|
||||
# Configure MSVC Runtime
|
||||
|
@ -131,9 +131,12 @@ endforeach(FILEPATH)
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_subdirectory(client)
|
||||
set(FREERDP_CHANNELS_CLIENT_SRCS ${FREERDP_CHANNELS_CLIENT_SRCS} PARENT_SCOPE)
|
||||
set(FREERDP_CHANNELS_CLIENT_LIBS ${FREERDP_CHANNELS_CLIENT_LIBS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(WITH_SERVER_CHANNELS)
|
||||
add_subdirectory(server)
|
||||
set(FREERDP_CHANNELS_SERVER_SRCS ${FREERDP_CHANNELS_SERVER_SRCS} PARENT_SCOPE)
|
||||
set(FREERDP_CHANNELS_SERVER_LIBS ${FREERDP_CHANNELS_SERVER_LIBS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
|
@ -37,7 +37,7 @@ foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
|
||||
set(ENTRY_POINT_NAME "${STATIC_MODULE_CHANNEL}_${${STATIC_MODULE}_CLIENT_ENTRY}")
|
||||
set(ENTRY_POINT_IMPORT "extern void ${ENTRY_POINT_NAME}();")
|
||||
set(${STATIC_ENTRY}_IMPORTS "${${STATIC_ENTRY}_IMPORTS}\n${ENTRY_POINT_IMPORT}")
|
||||
set(${STATIC_ENTRY}_TABLE "${${STATIC_ENTRY}_TABLE}\n\t{ \"${STATIC_MODULE_NAME}\", ${ENTRY_POINT_NAME} },")
|
||||
set(${STATIC_ENTRY}_TABLE "${${STATIC_ENTRY}_TABLE}\n\t{ \"${STATIC_MODULE_CHANNEL}\", ${ENTRY_POINT_NAME} },")
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
@ -61,12 +61,8 @@ set(CLIENT_STATIC_ENTRY_TABLES_LIST "${CLIENT_STATIC_ENTRY_TABLES_LIST}\n\t{ \"\
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tables.c.in ${CMAKE_CURRENT_SOURCE_DIR}/tables.c)
|
||||
|
||||
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
@ -75,7 +71,5 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MODULE winpr
|
||||
MODULES winpr-crt winpr-synch winpr-interlocked)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Client")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} PARENT_SCOPE)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
|
||||
|
@ -18,10 +18,10 @@
|
||||
define_channel_client("sample")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
skel_main.c
|
||||
skel_main.h)
|
||||
sample_main.c
|
||||
sample_main.h)
|
||||
|
||||
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")
|
||||
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "VirtualChannelEntry")
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
@ -35,4 +35,3 @@ if(NOT STATIC_CHANNELS)
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Audio Output Virtual Channel
|
||||
* Sample Virtual Channel
|
||||
*
|
||||
* Copyright 2009-2012 Jay Sorg
|
||||
* Copyright 2010-2012 Vic Lee
|
||||
@ -30,15 +30,17 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <freerdp/constants.h>
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/utils/memory.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/list.h>
|
||||
#include <freerdp/utils/load_plugin.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#include "skel_main.h"
|
||||
#include "sample_main.h"
|
||||
|
||||
struct sample_plugin
|
||||
{
|
||||
@ -50,20 +52,20 @@ struct sample_plugin
|
||||
|
||||
static void sample_process_interval(rdpSvcPlugin* plugin)
|
||||
{
|
||||
printf("skel_process_interval:\n");
|
||||
printf("sample_process_interval:\n");
|
||||
}
|
||||
|
||||
static void sample_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
|
||||
{
|
||||
skelPlugin* skel = (skelPlugin*)plugin;
|
||||
STREAM* data_out;
|
||||
int bytes;
|
||||
STREAM* data_out;
|
||||
samplePlugin* sample = (samplePlugin*) plugin;
|
||||
|
||||
printf("skel_process_receive:\n");
|
||||
printf("sample_process_receive:\n");
|
||||
|
||||
if (skel == NULL)
|
||||
if (sample == NULL)
|
||||
{
|
||||
printf("skel_process_receive: skel is nil\n");
|
||||
printf("sample_process_receive: sample is nil\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -71,7 +73,7 @@ static void sample_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
|
||||
/* here we just send the same data back */
|
||||
|
||||
bytes = stream_get_size(data_in);
|
||||
printf("skel_process_receive: got bytes %d\n", bytes);
|
||||
printf("sample_process_receive: got bytes %d\n", bytes);
|
||||
if (bytes > 0)
|
||||
{
|
||||
data_out = stream_new(bytes);
|
||||
@ -80,7 +82,7 @@ static void sample_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
|
||||
we do not free it */
|
||||
|
||||
bytes = stream_get_length(data_in);
|
||||
printf("skel_process_receive: sending bytes %d\n", bytes);
|
||||
printf("sample_process_receive: sending bytes %d\n", bytes);
|
||||
|
||||
svc_plugin_send(plugin, data_out);
|
||||
}
|
||||
@ -118,11 +120,11 @@ static void sample_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
||||
|
||||
static void sample_process_terminate(rdpSvcPlugin* plugin)
|
||||
{
|
||||
skelPlugin* skel = (skelPlugin*)plugin;
|
||||
samplePlugin* sample = (samplePlugin*)plugin;
|
||||
|
||||
printf("sample_process_terminate:\n");
|
||||
|
||||
if (skel == NULL)
|
||||
if (sample == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Audio Output Virtual Channel
|
||||
* Sample Virtual Channel
|
||||
*
|
||||
* Copyright 2012 Jay Sorg
|
||||
* Copyright 2010-2012 Vic Lee
|
@ -34,7 +34,7 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
@ -43,7 +43,5 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MODULE winpr
|
||||
MODULES winpr-crt winpr-synch winpr-interlocked)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Server")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} PARENT_SCOPE)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
|
||||
|
@ -18,6 +18,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -30,6 +34,27 @@
|
||||
|
||||
#include "channels.h"
|
||||
|
||||
/**
|
||||
* this is a workaround to force importing symbols
|
||||
* will need to fix that later on cleanly
|
||||
*/
|
||||
|
||||
#include <freerdp/server/audin.h>
|
||||
#include <freerdp/server/rdpsnd.h>
|
||||
|
||||
void freerdp_channels_dummy()
|
||||
{
|
||||
audin_server_context_new(NULL);
|
||||
audin_server_context_free(NULL);
|
||||
|
||||
rdpsnd_server_context_new(NULL);
|
||||
rdpsnd_server_context_free(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* end of ugly symbols import workaround
|
||||
*/
|
||||
|
||||
#define CREATE_REQUEST_PDU 0x01
|
||||
#define DATA_FIRST_PDU 0x02
|
||||
#define DATA_PDU 0x03
|
||||
|
@ -25,6 +25,8 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CMAKE_DL_LIBS})
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
|
@ -16,7 +16,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
set(MODULE_NAME "xfreerdp")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_X11")
|
||||
|
||||
include(FindXmlto)
|
||||
include_directories(${X11_INCLUDE_DIRS})
|
||||
@ -101,7 +101,7 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHI
|
||||
MODULES freerdp-core freerdp-gdi freerdp-locale freerdp-rail freerdp-utils)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/X11")
|
||||
|
||||
|
@ -22,6 +22,11 @@ set(${MODULE_PREFIX}_SRCS
|
||||
client.c
|
||||
file.c)
|
||||
|
||||
set(FREERDP_CHANNELS_CLIENT_PATH "../../channels/client")
|
||||
foreach(FREERDP_CHANNELS_CLIENT_SRC ${FREERDP_CHANNELS_CLIENT_SRCS})
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} "${FREERDP_CHANNELS_CLIENT_PATH}/${FREERDP_CHANNELS_CLIENT_SRC}")
|
||||
endforeach()
|
||||
|
||||
if(MSVC)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
|
||||
endif()
|
||||
@ -30,9 +35,11 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
|
||||
${FREERDP_CHANNELS_CLIENT_LIBS})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define FREERDP_CHANNELS_CLIENT
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/channels/channels.h>
|
||||
|
||||
FREERDP_API void* freerdp_channels_client_find_static_entry(const char* name, const char* identifier);
|
||||
FREERDP_API void* freerdp_channels_client_find_dynamic_entry(const char* name, const char* identifier);
|
||||
|
@ -44,4 +44,3 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Sample")
|
||||
|
||||
|
@ -21,6 +21,11 @@ set(MODULE_PREFIX "FREERDP_SERVER")
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
server.c)
|
||||
|
||||
set(FREERDP_CHANNELS_SERVER_PATH "../../channels/server")
|
||||
foreach(FREERDP_CHANNELS_SERVER_SRC ${FREERDP_CHANNELS_SERVER_SRCS})
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} "${FREERDP_CHANNELS_SERVER_PATH}/${FREERDP_CHANNELS_SERVER_SRC}")
|
||||
endforeach()
|
||||
|
||||
if(MSVC)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
|
||||
endif()
|
||||
@ -29,9 +34,11 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-server)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
|
||||
${FREERDP_CHANNELS_SERVER_LIBS})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
|
||||
|
@ -21,4 +21,3 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user