Merge branch 'master' of github.com:awakecoding/FreeRDP into xrdp-ng
This commit is contained in:
commit
f790831e7d
6
.gitignore
vendored
6
.gitignore
vendored
@ -16,6 +16,12 @@ _CPack_Packages
|
||||
external/*
|
||||
!external/README
|
||||
|
||||
*.a.objlist.cmake
|
||||
*.a.objlist
|
||||
*.a.objdir
|
||||
*_dummy.c
|
||||
*_dummy.c.base
|
||||
|
||||
# Packages
|
||||
*.zip
|
||||
*.exe
|
||||
|
@ -24,6 +24,8 @@ project(FreeRDP C)
|
||||
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# Include our extra modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
|
||||
|
||||
@ -473,9 +475,7 @@ if(WITH_THIRD_PARTY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT WITH_WAYK)
|
||||
add_subdirectory(include)
|
||||
endif()
|
||||
|
||||
add_subdirectory(libfreerdp)
|
||||
|
||||
@ -500,13 +500,10 @@ endif()
|
||||
|
||||
SET(CPACK_BINARY_ZIP "ON")
|
||||
|
||||
if(NOT WITH_WAYK)
|
||||
|
||||
set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/\\\\.gitignore;/CMakeCache.txt")
|
||||
|
||||
if(NOT WIN32)
|
||||
if(APPLE AND (NOT IOS))
|
||||
#set(CPACK_PACKAGE_EXECUTABLES "mfreerdp")
|
||||
|
||||
if(WITH_SERVER)
|
||||
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "mfreerdp-server")
|
||||
@ -520,7 +517,6 @@ if(NOT WIN32)
|
||||
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "xfreerdp-server")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
@ -558,29 +554,12 @@ if(MSVC)
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
if(NOT WITH_WAYK)
|
||||
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT libraries)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(EXTRA_DATA_DIR "extra/")
|
||||
file(GLOB EXTRA_FILES "${CMAKE_SOURCE_DIR}/extra/*")
|
||||
install(FILES ${EXTRA_FILES}
|
||||
DESTINATION ${EXTRA_DATA_DIR}
|
||||
COMPONENT extra)
|
||||
|
||||
set(REV_DATA_DIR "REV/")
|
||||
file(GLOB REV_FILES "${CMAKE_SOURCE_DIR}/REV/*")
|
||||
install(FILES ${REV_FILES}
|
||||
DESTINATION ${REV_DATA_DIR}
|
||||
COMPONENT rev)
|
||||
|
||||
set(CPACK_COMPONENTS_AL ${CPACK_COMPONENTS_ALL} extra rev)
|
||||
endif()
|
||||
|
||||
|
||||
set(CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client")
|
||||
set(CPACK_COMPONENT_CLIENT_GROUP "Applications")
|
||||
|
||||
@ -608,4 +587,3 @@ endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
endif()
|
||||
|
@ -30,7 +30,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES})
|
||||
|
||||
|
@ -30,7 +30,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PULSE_LIBRARY})
|
||||
|
||||
|
@ -28,7 +28,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
|
@ -30,7 +30,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
|
@ -30,7 +30,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PULSE_LIBRARY})
|
||||
|
||||
|
@ -30,7 +30,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES})
|
||||
|
||||
|
@ -30,7 +30,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PULSE_LIBRARY})
|
||||
|
||||
|
14
client/.gitignore
vendored
14
client/.gitignore
vendored
@ -1,4 +1,10 @@
|
||||
WaykClient
|
||||
|
||||
|
||||
DotNetClient
|
||||
/*
|
||||
!/Android
|
||||
!/common
|
||||
!/DirectFB
|
||||
!/iOS
|
||||
!/Mac
|
||||
!/Sample
|
||||
!/Windows
|
||||
!/X11
|
||||
!/CMakeLists.txt
|
||||
|
4
client/Android/ModuleOptions.cmake
Normal file
4
client/Android/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_CLIENT_NAME "afreerdp")
|
||||
set(FREERDP_CLIENT_PLATFORM "Android")
|
||||
set(FREERDP_CLIENT_VENDOR "FreeRDP")
|
@ -51,10 +51,26 @@ if(ANDROID)
|
||||
add_subdirectory(Android)
|
||||
endif()
|
||||
|
||||
if(WITH_WAYK)
|
||||
add_subdirectory(WaykClient)
|
||||
endif()
|
||||
# Pick up other clients
|
||||
|
||||
if (WITH_DOTNET)
|
||||
add_subdirectory(DotNetClient)
|
||||
set(FILENAME "ModuleOptions.cmake")
|
||||
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
|
||||
|
||||
foreach(FILEPATH ${FILEPATHS})
|
||||
if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
|
||||
string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH})
|
||||
set(FREERDP_CLIENT_ENABLED 0)
|
||||
include(${FILEPATH})
|
||||
if(FREERDP_CLIENT_ENABLED)
|
||||
if(NOT (${FREERDP_CLIENT_VENDOR} MATCHES "FreeRDP"))
|
||||
list(APPEND FREERDP_EXTRA_CLIENTS ${FREERDP_CLIENT})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(FREERDP_CLIENT ${FREERDP_EXTRA_CLIENTS})
|
||||
add_subdirectory(${FREERDP_CLIENT})
|
||||
endforeach()
|
||||
|
||||
|
||||
|
4
client/DirectFB/ModuleOptions.cmake
Normal file
4
client/DirectFB/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_CLIENT_NAME "dfreerdp")
|
||||
set(FREERDP_CLIENT_PLATFORM "DirectFB")
|
||||
set(FREERDP_CLIENT_VENDOR "FreeRDP")
|
@ -85,7 +85,6 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHI
|
||||
MODULE winpr
|
||||
MODULES winpr-input winpr-crt winpr-utils)
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
# Set a list of the dependent targets used by the application. There should be a way to get this list automatically
|
||||
|
4
client/Mac/ModuleOptions.cmake
Normal file
4
client/Mac/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_CLIENT_NAME "mfreerdp")
|
||||
set(FREERDP_CLIENT_PLATFORM "MacOSX")
|
||||
set(FREERDP_CLIENT_VENDOR "FreeRDP")
|
4
client/Sample/ModuleOptions.cmake
Normal file
4
client/Sample/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_CLIENT_NAME "sfreerdp")
|
||||
set(FREERDP_CLIENT_PLATFORM "Sample")
|
||||
set(FREERDP_CLIENT_VENDOR "FreeRDP")
|
@ -63,10 +63,8 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
if(WITH_CLIENT_INTERFACE)
|
||||
if (NOT WITH_WAYK)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
add_subdirectory(cli)
|
||||
endif()
|
||||
else()
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client)
|
||||
endif()
|
||||
|
4
client/Windows/ModuleOptions.cmake
Normal file
4
client/Windows/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_CLIENT_NAME "wfreerdp")
|
||||
set(FREERDP_CLIENT_PLATFORM "Windows")
|
||||
set(FREERDP_CLIENT_VENDOR "FreeRDP")
|
4
client/X11/ModuleOptions.cmake
Normal file
4
client/X11/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_CLIENT_NAME "xfreerdp")
|
||||
set(FREERDP_CLIENT_PLATFORM "X11")
|
||||
set(FREERDP_CLIENT_VENDOR "FreeRDP")
|
@ -20,6 +20,7 @@
|
||||
#ifndef __XF_MONITOR_H
|
||||
#define __XF_MONITOR_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/rail/rail.h>
|
||||
|
||||
@ -43,8 +44,8 @@ typedef struct _VIRTUAL_SCREEN VIRTUAL_SCREEN;
|
||||
#include "xf_client.h"
|
||||
#include "xfreerdp.h"
|
||||
|
||||
int xf_list_monitors(xfContext* xfc);
|
||||
BOOL xf_detect_monitors(xfContext* xfc, rdpSettings* settings);
|
||||
void xf_monitors_free(xfContext *xfc, rdpSettings *settings);
|
||||
FREERDP_API int xf_list_monitors(xfContext* xfc);
|
||||
FREERDP_API BOOL xf_detect_monitors(xfContext* xfc, rdpSettings* settings);
|
||||
FREERDP_API void xf_monitors_free(xfContext *xfc, rdpSettings *settings);
|
||||
|
||||
#endif /* __XF_MONITOR_H */
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
typedef struct xf_context xfContext;
|
||||
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include "xf_window.h"
|
||||
#include "xf_monitor.h"
|
||||
#include "xf_channels.h"
|
||||
@ -215,7 +217,7 @@ void xf_unlock_x11(xfContext* xfc, BOOL display);
|
||||
void xf_draw_screen_scaled(xfContext* xfc, int x, int y, int w, int h, BOOL scale);
|
||||
void xf_transform_window(xfContext* xfc);
|
||||
|
||||
DWORD xf_exit_code_from_disconnect_reason(DWORD reason);
|
||||
FREERDP_API DWORD xf_exit_code_from_disconnect_reason(DWORD reason);
|
||||
|
||||
#endif /* __XFREERDP_H */
|
||||
|
||||
|
@ -52,11 +52,7 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHI
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
|
||||
if (NOT WITH_WAYK)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Common")
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
int freerdp_detect_old_command_line_syntax(int argc, char** argv, int* count);
|
||||
int freerdp_client_parse_old_command_line_arguments(int argc, char** argv, rdpSettings* settings);
|
||||
FREERDP_API int freerdp_detect_old_command_line_syntax(int argc, char** argv, int* count);
|
||||
FREERDP_API int freerdp_client_parse_old_command_line_arguments(int argc, char** argv, rdpSettings* settings);
|
||||
|
||||
#endif /* FREERDP_CLIENT_COMPATIBILITY */
|
||||
|
||||
|
4
client/iOS/ModuleOptions.cmake
Normal file
4
client/iOS/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_CLIENT_NAME "ifreerdp")
|
||||
set(FREERDP_CLIENT_PLATFORM "iOS")
|
||||
set(FREERDP_CLIENT_VENDOR "FreeRDP")
|
@ -1,4 +1,6 @@
|
||||
|
||||
|
||||
include(EchoTarget)
|
||||
include(CMakeParseArguments)
|
||||
|
||||
macro(set_complex_link_libraries)
|
||||
@ -46,3 +48,32 @@ macro(add_complex_library)
|
||||
endif()
|
||||
|
||||
endmacro(add_complex_library)
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_GREATER 2.8.8)
|
||||
set(CMAKE_OBJECT_TARGET_SUPPORT 1)
|
||||
endif()
|
||||
|
||||
function(create_object_cotarget target)
|
||||
|
||||
set(cotarget "${target}-objects")
|
||||
|
||||
get_target_property(${target}_TYPE ${target} TYPE)
|
||||
|
||||
if(NOT ((${target}_TYPE MATCHES "SHARED_LIBRARY") OR (${target}_TYPE MATCHES "SHARED_LIBRARY")))
|
||||
return()
|
||||
endif()
|
||||
|
||||
get_target_property(${target}_SOURCES ${target} SOURCES)
|
||||
get_target_property(${target}_LINK_LIBRARIES ${target} LINK_LIBRARIES)
|
||||
get_target_property(${target}_INCLUDE_DIRECTORIES ${target} INCLUDE_DIRECTORIES)
|
||||
|
||||
add_library(${cotarget} "OBJECT" ${${target}_SOURCES})
|
||||
|
||||
set_target_properties(${cotarget} PROPERTIES LINK_LIBRARIES "${${target}_LINK_LIBRARIES}")
|
||||
set_target_properties(${cotarget} PROPERTIES INCLUDE_DIRECTORIES "${${target}_INCLUDE_DIRECTORIES}")
|
||||
|
||||
echo_target(${target})
|
||||
echo_target(${cotarget})
|
||||
|
||||
endfunction()
|
||||
|
||||
|
178
cmake/EchoTarget.cmake
Normal file
178
cmake/EchoTarget.cmake
Normal file
@ -0,0 +1,178 @@
|
||||
function(echo_target_property tgt prop)
|
||||
# v for value, d for defined, s for set
|
||||
get_property(v TARGET ${tgt} PROPERTY ${prop})
|
||||
get_property(d TARGET ${tgt} PROPERTY ${prop} DEFINED)
|
||||
get_property(s TARGET ${tgt} PROPERTY ${prop} SET)
|
||||
|
||||
# only produce output for values that are set
|
||||
if(s)
|
||||
message("tgt='${tgt}' prop='${prop}'")
|
||||
message(" value='${v}'")
|
||||
message(" defined='${d}'")
|
||||
message(" set='${s}'")
|
||||
message("")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(echo_target tgt)
|
||||
if(NOT TARGET ${tgt})
|
||||
message("There is no target named '${tgt}'")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(props
|
||||
DEBUG_OUTPUT_NAME
|
||||
RELEASE_OUTPUT_NAME
|
||||
DEBUG_POSTFIX
|
||||
RELEASE_POSTFIX
|
||||
ARCHIVE_OUTPUT_DIRECTORY
|
||||
ARCHIVE_OUTPUT_DIRECTORY_DEBUG
|
||||
ARCHIVE_OUTPUT_DIRECTORY_RELEASE
|
||||
ARCHIVE_OUTPUT_NAME
|
||||
ARCHIVE_OUTPUT_NAME_DEBUG
|
||||
ARCHIVE_OUTPUT_NAME_RELEASE
|
||||
AUTOMOC
|
||||
AUTOMOC_MOC_OPTIONS
|
||||
BUILD_WITH_INSTALL_RPATH
|
||||
BUNDLE
|
||||
BUNDLE_EXTENSION
|
||||
COMPILE_DEFINITIONS
|
||||
COMPILE_DEFINITIONS_DEBUG
|
||||
COMPILE_DEFINITIONS_RELEASE
|
||||
COMPILE_FLAGS
|
||||
DEBUG_POSTFIX
|
||||
DEFINE_SYMBOL
|
||||
ENABLE_EXPORTS
|
||||
EXCLUDE_FROM_ALL
|
||||
EchoString
|
||||
FOLDER
|
||||
FRAMEWORK
|
||||
Fortran_FORMAT
|
||||
Fortran_MODULE_DIRECTORY
|
||||
GENERATOR_FILE_NAME
|
||||
GNUtoMS
|
||||
HAS_CXX
|
||||
IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
|
||||
IMPORTED
|
||||
IMPORTED_CONFIGURATIONS
|
||||
IMPORTED_IMPLIB
|
||||
IMPORTED_IMPLIB_RELEASE
|
||||
IMPORTED_IMPLIB_RELEASE
|
||||
IMPORTED_LINK_DEPENDENT_LIBRARIES
|
||||
IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG
|
||||
IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE
|
||||
IMPORTED_LINK_INTERFACE_LIBRARIES
|
||||
IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG
|
||||
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE
|
||||
IMPORTED_LINK_INTERFACE_MULTIPLICITY
|
||||
IMPORTED_LINK_INTERFACE_MULTIPLICITY_DEBUG
|
||||
IMPORTED_LINK_INTERFACE_MULTIPLICITY_RELEASE
|
||||
IMPORTED_LOCATION
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
IMPORTED_NO_SONAME
|
||||
IMPORTED_NO_SONAME_DEBUG
|
||||
IMPORTED_NO_SONAME_RELEASE
|
||||
IMPORTED_SONAME
|
||||
IMPORTED_SONAME_DEBUG
|
||||
IMPORTED_SONAME_RELEASE
|
||||
IMPORT_PREFIX
|
||||
IMPORT_SUFFIX
|
||||
INCLUDE_DIRECTORIES
|
||||
INSTALL_NAME_DIR
|
||||
INSTALL_RPATH
|
||||
INSTALL_RPATH_USE_LINK_PATH
|
||||
INTERPROCEDURAL_OPTIMIZATION
|
||||
INTERPROCEDURAL_OPTIMIZATION_DEBUG
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE
|
||||
LABELS
|
||||
LIBRARY_OUTPUT_DIRECTORY
|
||||
LIBRARY_OUTPUT_DIRECTORY_DEBUG
|
||||
LIBRARY_OUTPUT_DIRECTORY_RELEASE
|
||||
LIBRARY_OUTPUT_NAME
|
||||
LIBRARY_OUTPUT_NAME_DEBUG
|
||||
LIBRARY_OUTPUT_NAME_RELEASE
|
||||
LINKER_LANGUAGE
|
||||
LINK_DEPENDS
|
||||
LINK_LIBRARIES
|
||||
LINK_FLAGS
|
||||
LINK_FLAGS_DEBUG
|
||||
LINK_FLAGS_RELEASE
|
||||
LINK_INTERFACE_LIBRARIES
|
||||
LINK_INTERFACE_LIBRARIES_DEBUG
|
||||
LINK_INTERFACE_LIBRARIES_RELEASE
|
||||
LINK_INTERFACE_MULTIPLICITY
|
||||
LINK_INTERFACE_MULTIPLICITY_DEBUG
|
||||
LINK_INTERFACE_MULTIPLICITY_RELEASE
|
||||
LINK_SEARCH_END_STATIC
|
||||
LINK_SEARCH_START_STATIC
|
||||
LOCATION
|
||||
LOCATION_DEBUG
|
||||
LOCATION_RELEASE
|
||||
MACOSX_BUNDLE
|
||||
MACOSX_BUNDLE_INFO_PLIST
|
||||
MACOSX_FRAMEWORK_INFO_PLIST
|
||||
MAP_IMPORTED_CONFIG_DEBUG
|
||||
MAP_IMPORTED_CONFIG_RELEASE
|
||||
OSX_ARCHITECTURES
|
||||
OSX_ARCHITECTURES_DEBUG
|
||||
OSX_ARCHITECTURES_RELEASE
|
||||
OUTPUT_NAME
|
||||
OUTPUT_NAME_DEBUG
|
||||
OUTPUT_NAME_RELEASE
|
||||
POST_INSTALL_SCRIPT
|
||||
PREFIX
|
||||
PRE_INSTALL_SCRIPT
|
||||
PRIVATE_HEADER
|
||||
PROJECT_LABEL
|
||||
PUBLIC_HEADER
|
||||
RESOURCE
|
||||
RULE_LAUNCH_COMPILE
|
||||
RULE_LAUNCH_CUSTOM
|
||||
RULE_LAUNCH_LINK
|
||||
RUNTIME_OUTPUT_DIRECTORY
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
RUNTIME_OUTPUT_NAME
|
||||
RUNTIME_OUTPUT_NAME_DEBUG
|
||||
RUNTIME_OUTPUT_NAME_RELEASE
|
||||
SKIP_BUILD_RPATH
|
||||
SOURCES
|
||||
SOVERSION
|
||||
STATIC_LIBRARY_FLAGS
|
||||
STATIC_LIBRARY_FLAGS_DEBUG
|
||||
STATIC_LIBRARY_FLAGS_RELEASE
|
||||
SUFFIX
|
||||
TYPE
|
||||
VERSION
|
||||
VS_DOTNET_REFERENCES
|
||||
VS_GLOBAL_KEYWORD
|
||||
VS_GLOBAL_PROJECT_TYPES
|
||||
VS_KEYWORD
|
||||
VS_SCC_AUXPATH
|
||||
VS_SCC_LOCALPATH
|
||||
VS_SCC_PROJECTNAME
|
||||
VS_SCC_PROVIDER
|
||||
VS_WINRT_EXTENSIONS
|
||||
VS_WINRT_REFERENCES
|
||||
WIN32_EXECUTABLE
|
||||
)
|
||||
|
||||
message("======================== ${tgt} ========================")
|
||||
foreach(p ${props})
|
||||
echo_target_property("${tgt}" "${p}")
|
||||
endforeach()
|
||||
message("")
|
||||
|
||||
endfunction()
|
||||
|
||||
function(echo_targets)
|
||||
set(tgts ${ARGV})
|
||||
foreach(t ${tgts})
|
||||
echo_target("${t}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
@ -12,16 +12,19 @@
|
||||
# You should have received a copy of the FMILIB_License.txt file
|
||||
# along with this program. If not, contact Modelon AB <http://www.modelon.com>.
|
||||
|
||||
# Merge_static_libs(outlib lib1 lib2 ... libn) merges a number of static
|
||||
# Merge_static_libs(output_library lib1 lib2 ... libn) merges a number of static
|
||||
# libs into a single static library
|
||||
function(merge_static_libs outlib)
|
||||
function(merge_static_libs output_library)
|
||||
set(output_target "${output_library}")
|
||||
string(REGEX REPLACE "-" "_" output_library ${output_library})
|
||||
set(libs ${ARGV})
|
||||
list(REMOVE_AT libs 0)
|
||||
|
||||
# Create a dummy file that the target will depend on
|
||||
set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${outlib}_dummy.c)
|
||||
set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${output_library}_dummy.c)
|
||||
file(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
|
||||
|
||||
add_library(${outlib} STATIC ${dummyfile})
|
||||
add_library(${output_target} STATIC ${dummyfile})
|
||||
|
||||
if("${CMAKE_CFG_INTDIR}" STREQUAL ".")
|
||||
set(multiconfig FALSE)
|
||||
@ -45,7 +48,7 @@ function(merge_static_libs outlib)
|
||||
list(APPEND libfiles "${libfile}")
|
||||
endif(multiconfig)
|
||||
endforeach()
|
||||
#message(STATUS "will be merging ${libfiles}")
|
||||
|
||||
# Just to be sure: cleanup from duplicates
|
||||
if(multiconfig)
|
||||
foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
|
||||
@ -64,7 +67,7 @@ function(merge_static_libs outlib)
|
||||
set(flags "${flags} ${lib}")
|
||||
endforeach()
|
||||
string(TOUPPER "STATIC_LIBRARY_FLAGS_${CONFIG_TYPE}" PROPNAME)
|
||||
set_target_properties(${outlib} PROPERTIES ${PROPNAME} "${flags}")
|
||||
set_target_properties(${output_target} PROPERTIES ${PROPNAME} "${flags}")
|
||||
endforeach()
|
||||
|
||||
elseif(APPLE)
|
||||
@ -72,8 +75,8 @@ function(merge_static_libs outlib)
|
||||
if(multiconfig)
|
||||
message(FATAL_ERROR "Multiple configurations are not supported")
|
||||
endif()
|
||||
get_target_property(outfile ${outlib} LOCATION)
|
||||
add_custom_command(TARGET ${outlib} POST_BUILD
|
||||
get_target_property(outfile ${output_target} LOCATION)
|
||||
add_custom_command(TARGET ${output_target} POST_BUILD
|
||||
COMMAND rm ${outfile}
|
||||
COMMAND /usr/bin/libtool -static -o ${outfile}
|
||||
${libfiles}
|
||||
@ -83,45 +86,63 @@ function(merge_static_libs outlib)
|
||||
if(multiconfig)
|
||||
message(FATAL_ERROR "Multiple configurations are not supported")
|
||||
endif()
|
||||
get_target_property(outfile ${outlib} LOCATION)
|
||||
message(STATUS "outfile location is ${outfile}")
|
||||
get_target_property(outfile ${output_target} LOCATION)
|
||||
message(STATUS "output file location is ${outfile}")
|
||||
foreach(lib ${libfiles})
|
||||
# objlistfile will contain the list of object files for the library
|
||||
set(objlistfile ${lib}.objlist)
|
||||
set(objdir ${lib}.objdir)
|
||||
set(objlistcmake ${objlistfile}.cmake)
|
||||
# we only need to extract files once
|
||||
get_filename_component(libname ${lib} NAME_WE)
|
||||
|
||||
if(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cmake.check_cache IS_NEWER_THAN ${objlistcmake})
|
||||
#---------------------------------
|
||||
FILE(WRITE ${objlistcmake}
|
||||
"# Extract object files from the library
|
||||
|
||||
file(WRITE ${objlistcmake} "
|
||||
# delete previous object files
|
||||
message(STATUS \"Removing previous object files from ${lib}\")
|
||||
EXECUTE_PROCESS(COMMAND ls .
|
||||
WORKING_DIRECTORY ${objdir}
|
||||
COMMAND xargs -I {} rm {}
|
||||
WORKING_DIRECTORY ${objdir})
|
||||
# Extract object files from the library
|
||||
message(STATUS \"Extracting object files from ${lib}\")
|
||||
EXECUTE_PROCESS(COMMAND ${CMAKE_AR} -x ${lib}
|
||||
WORKING_DIRECTORY ${objdir})
|
||||
# Prefixing object files to avoid conflicts
|
||||
message(STATUS \"Prefixing object files to avoid conflicts\")
|
||||
EXECUTE_PROCESS(COMMAND ls .
|
||||
WORKING_DIRECTORY ${objdir}
|
||||
COMMAND xargs -I {} mv {} ${libname}_{}
|
||||
WORKING_DIRECTORY ${objdir})
|
||||
# save the list of object files
|
||||
EXECUTE_PROCESS(COMMAND ls .
|
||||
OUTPUT_FILE ${objlistfile}
|
||||
WORKING_DIRECTORY ${objdir})")
|
||||
#---------------------------------
|
||||
WORKING_DIRECTORY ${objdir})
|
||||
")
|
||||
|
||||
file(MAKE_DIRECTORY ${objdir})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${objlistfile}
|
||||
COMMAND ${CMAKE_COMMAND} -P ${objlistcmake}
|
||||
DEPENDS ${lib})
|
||||
|
||||
endif()
|
||||
|
||||
list(APPEND extrafiles "${objlistfile}")
|
||||
# relative path is needed by ar under MSYS
|
||||
file(RELATIVE_PATH objlistfilerpath ${objdir} ${objlistfile})
|
||||
add_custom_command(TARGET ${outlib} POST_BUILD
|
||||
add_custom_command(TARGET ${output_target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Running: ${CMAKE_AR} ru ${outfile} @${objlistfilerpath}"
|
||||
COMMAND ${CMAKE_AR} ru "${outfile}" @"${objlistfilerpath}"
|
||||
#COMMAND ld -r -static -o "${outfile}" --whole-archive @"${objlistfilerpath}"
|
||||
WORKING_DIRECTORY ${objdir})
|
||||
endforeach()
|
||||
add_custom_command(TARGET ${outlib} POST_BUILD
|
||||
add_custom_command(TARGET ${output_target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Running: ${CMAKE_RANLIB} ${outfile}"
|
||||
COMMAND ${CMAKE_RANLIB} ${outfile})
|
||||
endif()
|
||||
file(WRITE ${dummyfile}.base "const char* ${outlib}_sublibs=\"${libs}\";")
|
||||
file(WRITE ${dummyfile}.base "const char* ${output_library}_sublibs=\"${libs}\";")
|
||||
add_custom_command(
|
||||
OUTPUT ${dummyfile}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${dummyfile}.base ${dummyfile}
|
||||
|
@ -59,11 +59,7 @@ if(MONOLITHIC_BUILD)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
if(NOT WITH_WAYK)
|
||||
install(TARGETS ${MODULE_NAME}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT libraries)
|
||||
endif()
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")
|
||||
endif()
|
||||
|
@ -136,7 +136,7 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE winpr
|
||||
MODULES winpr-registry winpr-utils winpr-interlocked winpr-dsparse winpr-sspi winpr-rpc winpr-crt)
|
||||
MODULES winpr-registry winpr-utils winpr-interlocked winpr-dsparse winpr-sspi winpr-rpc winpr-handle winpr-crt)
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
int dummy()
|
||||
int freerdp_dummy()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -917,10 +917,20 @@ void gdi_register_update_callbacks(rdpUpdate* update)
|
||||
|
||||
void gdi_init_primary(rdpGdi* gdi)
|
||||
{
|
||||
gdi->primary = gdi_bitmap_new_ex(gdi, gdi->width, gdi->height, gdi->dstBpp, gdi->primary_buffer);
|
||||
gdi->primary = (gdiBitmap*) malloc(sizeof(gdiBitmap));
|
||||
gdi->primary->hdc = gdi_CreateCompatibleDC(gdi->hdc);
|
||||
|
||||
if (!gdi->primary_buffer)
|
||||
gdi->primary->bitmap = gdi_CreateCompatibleBitmap(gdi->hdc, gdi->width, gdi->height);
|
||||
else
|
||||
gdi->primary->bitmap = gdi_CreateBitmap(gdi->width, gdi->height, gdi->dstBpp, gdi->primary_buffer);
|
||||
|
||||
gdi_SelectObject(gdi->primary->hdc, (HGDIOBJECT) gdi->primary->bitmap);
|
||||
gdi->primary->org_bitmap = NULL;
|
||||
|
||||
gdi->primary_buffer = gdi->primary->bitmap->data;
|
||||
|
||||
if (gdi->drawing == NULL)
|
||||
if (!gdi->drawing)
|
||||
gdi->drawing = gdi->primary;
|
||||
|
||||
gdi->primary->hdc->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND));
|
||||
|
@ -133,6 +133,7 @@ static void svc_plugin_process_received(rdpSvcPlugin* plugin, void* pData, UINT3
|
||||
}
|
||||
|
||||
plugin->data_in = NULL;
|
||||
Stream_SealLength(data_in);
|
||||
Stream_SetPosition(data_in, 0);
|
||||
|
||||
MessageQueue_Post(plugin->MsgPipe->In, NULL, 0, (void*) data_in, NULL);
|
||||
|
10
server/.gitignore
vendored
10
server/.gitignore
vendored
@ -1,3 +1,7 @@
|
||||
WaykServer
|
||||
xrdp-ng
|
||||
|
||||
/*
|
||||
!/common
|
||||
!/Mac
|
||||
!/Sample
|
||||
!/Windows
|
||||
!/X11
|
||||
!/CmakeLists.txt
|
||||
|
@ -35,13 +35,28 @@ else()
|
||||
add_subdirectory(Windows)
|
||||
endif()
|
||||
|
||||
if(WITH_WAYK)
|
||||
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/WaykServer")
|
||||
add_subdirectory(WaykServer)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/xrdp-ng")
|
||||
add_subdirectory("xrdp-ng")
|
||||
endif()
|
||||
|
||||
# Pick up other clients
|
||||
|
||||
set(FILENAME "ModuleOptions.cmake")
|
||||
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
|
||||
|
||||
foreach(FILEPATH ${FILEPATHS})
|
||||
if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
|
||||
string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH})
|
||||
set(FREERDP_SERVER_ENABLED 0)
|
||||
include(${FILEPATH})
|
||||
if(FREERDP_SERVER_ENABLED)
|
||||
if(NOT (${FREERDP_SERVER_VENDOR} MATCHES "FreeRDP"))
|
||||
list(APPEND FREERDP_EXTRA_SERVERS ${FREERDP_SERVER})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(FREERDP_SERVER ${FREERDP_EXTRA_SERVERS})
|
||||
add_subdirectory(${FREERDP_SERVER})
|
||||
endforeach()
|
||||
|
4
server/Mac/ModuleOptions.cmake
Normal file
4
server/Mac/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_SERVER_NAME "mfreerdp-server")
|
||||
set(FREERDP_SERVER_PLATFORM "X11")
|
||||
set(FREERDP_SERVER_VENDOR "FreeRDP")
|
4
server/Sample/ModuleOptions.cmake
Normal file
4
server/Sample/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_SERVER_NAME "sfreerdp-server")
|
||||
set(FREERDP_SERVER_PLATFORM "Sample")
|
||||
set(FREERDP_SERVER_VENDOR "FreeRDP")
|
4
server/Windows/ModuleOptions.cmake
Normal file
4
server/Windows/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_SERVER_NAME "wfreerdp-server")
|
||||
set(FREERDP_SERVER_PLATFORM "Windows")
|
||||
set(FREERDP_SERVER_VENDOR "FreeRDP")
|
4
server/X11/ModuleOptions.cmake
Normal file
4
server/X11/ModuleOptions.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(FREERDP_SERVER_NAME "xfreerdp-server")
|
||||
set(FREERDP_SERVER_PLATFORM "X11")
|
||||
set(FREERDP_SERVER_VENDOR "FreeRDP")
|
@ -38,7 +38,6 @@ 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)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
int dummy()
|
||||
int winpr_dummy()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -28,10 +28,15 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib")
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
|
||||
MODULE winpr
|
||||
MODULES winpr-crt winpr-heap winpr-environment)
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
|
||||
else()
|
||||
target_link_libraries(${MODULE_NAME} winpr-crt winpr-heap winpr-environment)
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user