wfreerdp-server: fix build on Windows
This commit is contained in:
parent
8e424f7e4c
commit
5eb8ddd1bf
@ -32,7 +32,7 @@ macro(add_channel_server _channel_prefix _channel_name)
|
||||
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_name} 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)
|
||||
@ -50,13 +50,14 @@ macro(add_channel_client_library _module_prefix _module_name _plugin _entry)
|
||||
else()
|
||||
set(${_module_prefix}_STATIC ON PARENT_SCOPE)
|
||||
set(${_module_prefix}_NAME ${_module_name} PARENT_SCOPE)
|
||||
set(${_module_prefix}_CHANNEL ${_module_name} PARENT_SCOPE)
|
||||
set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE)
|
||||
add_library(${_module_name} STATIC ${${_module_prefix}_SRCS})
|
||||
endif()
|
||||
|
||||
endmacro(add_channel_client_library)
|
||||
|
||||
macro(add_channel_server_library _module_prefix _module_name _plugin _entry)
|
||||
macro(add_channel_server_library _module_prefix _module_name _channel_name _plugin _entry)
|
||||
|
||||
if(_plugin AND MSVC AND (NOT STATIC_CHANNELS))
|
||||
set(${_module_prefix}_SRCS ${${_module_prefix}_SRCS} module.def)
|
||||
@ -67,6 +68,7 @@ macro(add_channel_server_library _module_prefix _module_name _plugin _entry)
|
||||
else()
|
||||
set(${_module_prefix}_STATIC ON PARENT_SCOPE)
|
||||
set(${_module_prefix}_NAME ${_module_name} PARENT_SCOPE)
|
||||
set(${_module_prefix}_CHANNEL ${_channel_name} PARENT_SCOPE)
|
||||
set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE)
|
||||
add_library(${_module_name} STATIC ${${_module_prefix}_SRCS})
|
||||
endif()
|
||||
|
@ -22,7 +22,7 @@ string(TOUPPER "CHANNEL_${CHANNEL_NAME}_SERVER" MODULE_PREFIX)
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
audin.c)
|
||||
|
||||
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "DVCPluginEntry")
|
||||
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "DVCPluginEntry")
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
|
@ -55,6 +55,11 @@
|
||||
|
||||
#include "disk_file.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4244)
|
||||
#endif
|
||||
|
||||
static BOOL disk_file_wildcard_match(const char* pattern, const char* filename)
|
||||
{
|
||||
const char *p = pattern, *f = filename;
|
||||
@ -455,6 +460,8 @@ BOOL disk_file_set_information(DISK_FILE* file, UINT32 FsInformationClass, UINT3
|
||||
UINT32 FileAttributes;
|
||||
UINT32 FileNameLength;
|
||||
|
||||
m = 0;
|
||||
|
||||
switch (FsInformationClass)
|
||||
{
|
||||
case FileBasicInformation:
|
||||
@ -692,3 +699,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, UINT32 FsInformationClass, BYTE
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@ string(TOUPPER "CHANNEL_${CHANNEL_NAME}_SERVER" MODULE_PREFIX)
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
rdpsnd.c)
|
||||
|
||||
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "VirtualChannelEntry")
|
||||
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} FALSE "VirtualChannelEntry")
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
|
@ -47,4 +47,3 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Server")
|
||||
|
||||
|
@ -21,8 +21,14 @@ set(MODULE_PREFIX "FREERDP_CLIENT")
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
client.c)
|
||||
|
||||
if(MSVC)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
|
||||
endif()
|
||||
|
||||
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)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
3
client/common/module.def
Normal file
3
client/common/module.def
Normal file
@ -0,0 +1,3 @@
|
||||
LIBRARY "libfreerdp-client"
|
||||
EXPORTS
|
||||
|
@ -37,8 +37,7 @@ set(${MODULE_PREFIX}_SRCS
|
||||
wf_rdpsnd.h
|
||||
wf_settings.c
|
||||
wf_settings.h
|
||||
wf_info.c
|
||||
|
||||
wf_info.c
|
||||
wf_info.h)
|
||||
|
||||
if(WITH_SERVER_INTERFACE)
|
||||
|
@ -21,12 +21,17 @@ set(MODULE_PREFIX "FREERDP_SERVER")
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
server.c)
|
||||
|
||||
if(MSVC)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
|
||||
endif()
|
||||
|
||||
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)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Common")
|
||||
|
||||
|
3
server/common/module.def
Normal file
3
server/common/module.def
Normal file
@ -0,0 +1,3 @@
|
||||
LIBRARY "libfreerdp-server"
|
||||
EXPORTS
|
||||
|
Loading…
Reference in New Issue
Block a user