diff --git a/CMakeLists.txt b/CMakeLists.txt index a38dd3a19..f9a1c53f9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -472,9 +472,7 @@ if(WITH_THIRD_PARTY) endif() endif() -if (NOT WITH_WAYK) - add_subdirectory(include) -endif() +add_subdirectory(include) add_subdirectory(libfreerdp) @@ -499,27 +497,23 @@ 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(APPLE AND (NOT IOS)) - if(WITH_SERVER) - set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "mfreerdp-server") - endif() + if(WITH_SERVER) + set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "mfreerdp-server") + endif() endif() - if(WITH_X11) - set(CPACK_PACKAGE_EXECUTABLES "xfreerdp") + if(WITH_X11) + set(CPACK_PACKAGE_EXECUTABLES "xfreerdp") - if(WITH_SERVER) - set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "xfreerdp-server") - endif() + if(WITH_SERVER) + set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "xfreerdp-server") + endif() endif() - endif() set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") @@ -557,28 +551,11 @@ 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() - 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") @@ -607,4 +584,3 @@ endif() include(CPack) -endif() diff --git a/client/.gitignore b/client/.gitignore index 86106bc3c..8a070de0c 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1,4 +1,10 @@ -WaykClient - - -DotNetClient \ No newline at end of file +/* +!/Android +!/common +!/DirectFB +!/iOS +!/Mac +!/Sample +!/Windows +!/X11 +!/CMakeLists.txt diff --git a/client/Android/ModuleOptions.cmake b/client/Android/ModuleOptions.cmake new file mode 100644 index 000000000..38f85b400 --- /dev/null +++ b/client/Android/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_CLIENT_NAME "afreerdp") +set(FREERDP_CLIENT_PLATFORM "Android") +set(FREERDP_CLIENT_VENDOR "FreeRDP") diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index e78c37517..3d79c27fa 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -51,10 +51,26 @@ if(ANDROID) add_subdirectory(Android) endif() -if(WITH_WAYK) - add_subdirectory(WaykClient) -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_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() + -if (WITH_DOTNET) - add_subdirectory(DotNetClient) -endif() diff --git a/client/DirectFB/ModuleOptions.cmake b/client/DirectFB/ModuleOptions.cmake new file mode 100644 index 000000000..2ef9266f0 --- /dev/null +++ b/client/DirectFB/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_CLIENT_NAME "dfreerdp") +set(FREERDP_CLIENT_PLATFORM "DirectFB") +set(FREERDP_CLIENT_VENDOR "FreeRDP") diff --git a/client/Mac/ModuleOptions.cmake b/client/Mac/ModuleOptions.cmake new file mode 100644 index 000000000..3902d2b71 --- /dev/null +++ b/client/Mac/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_CLIENT_NAME "mfreerdp") +set(FREERDP_CLIENT_PLATFORM "MacOSX") +set(FREERDP_CLIENT_VENDOR "FreeRDP") diff --git a/client/Sample/ModuleOptions.cmake b/client/Sample/ModuleOptions.cmake new file mode 100644 index 000000000..d4d5a9e44 --- /dev/null +++ b/client/Sample/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_CLIENT_NAME "sfreerdp") +set(FREERDP_CLIENT_PLATFORM "Sample") +set(FREERDP_CLIENT_VENDOR "FreeRDP") diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index f32422cd3..0f2b26d65 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -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() diff --git a/client/Windows/ModuleOptions.cmake b/client/Windows/ModuleOptions.cmake new file mode 100644 index 000000000..a0fcaec59 --- /dev/null +++ b/client/Windows/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_CLIENT_NAME "wfreerdp") +set(FREERDP_CLIENT_PLATFORM "Windows") +set(FREERDP_CLIENT_VENDOR "FreeRDP") diff --git a/client/X11/ModuleOptions.cmake b/client/X11/ModuleOptions.cmake new file mode 100644 index 000000000..4fef68a2f --- /dev/null +++ b/client/X11/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_CLIENT_NAME "xfreerdp") +set(FREERDP_CLIENT_PLATFORM "X11") +set(FREERDP_CLIENT_VENDOR "FreeRDP") diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt index 2b9841e5f..0179a53a1 100644 --- a/client/common/CMakeLists.txt +++ b/client/common/CMakeLists.txt @@ -54,9 +54,7 @@ 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() +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Common") diff --git a/client/iOS/ModuleOptions.cmake b/client/iOS/ModuleOptions.cmake new file mode 100644 index 000000000..3c4b366bb --- /dev/null +++ b/client/iOS/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_CLIENT_NAME "ifreerdp") +set(FREERDP_CLIENT_PLATFORM "iOS") +set(FREERDP_CLIENT_VENDOR "FreeRDP") diff --git a/server/.gitignore b/server/.gitignore index e8786806f..b5581fbbc 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -1,3 +1,7 @@ -WaykServer -xrdp-ng - +/* +!/common +!/Mac +!/Sample +!/Windows +!/X11 +!/CmakeLists.txt diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index fed64d78c..a7c3ec233 100644 --- a/server/CMakeLists.txt +++ b/server/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() diff --git a/server/Mac/ModuleOptions.cmake b/server/Mac/ModuleOptions.cmake new file mode 100644 index 000000000..bfd36cbbf --- /dev/null +++ b/server/Mac/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_SERVER_NAME "mfreerdp-server") +set(FREERDP_SERVER_PLATFORM "X11") +set(FREERDP_SERVER_VENDOR "FreeRDP") diff --git a/server/Sample/ModuleOptions.cmake b/server/Sample/ModuleOptions.cmake new file mode 100644 index 000000000..5621f6d78 --- /dev/null +++ b/server/Sample/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_SERVER_NAME "sfreerdp-server") +set(FREERDP_SERVER_PLATFORM "Sample") +set(FREERDP_SERVER_VENDOR "FreeRDP") diff --git a/server/Windows/ModuleOptions.cmake b/server/Windows/ModuleOptions.cmake new file mode 100644 index 000000000..69d759661 --- /dev/null +++ b/server/Windows/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_SERVER_NAME "wfreerdp-server") +set(FREERDP_SERVER_PLATFORM "Windows") +set(FREERDP_SERVER_VENDOR "FreeRDP") diff --git a/server/X11/ModuleOptions.cmake b/server/X11/ModuleOptions.cmake new file mode 100644 index 000000000..fcba05934 --- /dev/null +++ b/server/X11/ModuleOptions.cmake @@ -0,0 +1,4 @@ + +set(FREERDP_SERVER_NAME "xfreerdp-server") +set(FREERDP_SERVER_PLATFORM "X11") +set(FREERDP_SERVER_VENDOR "FreeRDP")