freerdp: remove vendor-specific options from build system, add automatic ways of including external clients/servers

This commit is contained in:
Marc-André Moreau 2013-09-03 20:37:04 -04:00
parent 1b7abe9e4f
commit b480ce1830
18 changed files with 116 additions and 59 deletions

View File

@ -472,9 +472,7 @@ if(WITH_THIRD_PARTY)
endif() endif()
endif() endif()
if (NOT WITH_WAYK)
add_subdirectory(include) add_subdirectory(include)
endif()
add_subdirectory(libfreerdp) add_subdirectory(libfreerdp)
@ -499,13 +497,10 @@ endif()
SET(CPACK_BINARY_ZIP "ON") SET(CPACK_BINARY_ZIP "ON")
if(NOT WITH_WAYK)
set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/\\\\.gitignore;/CMakeCache.txt") set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/\\\\.gitignore;/CMakeCache.txt")
if(NOT WIN32) if(NOT WIN32)
if(APPLE AND (NOT IOS)) if(APPLE AND (NOT IOS))
#set(CPACK_PACKAGE_EXECUTABLES "mfreerdp")
if(WITH_SERVER) if(WITH_SERVER)
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "mfreerdp-server") set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "mfreerdp-server")
@ -519,7 +514,6 @@ if(NOT WIN32)
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "xfreerdp-server") set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "xfreerdp-server")
endif() endif()
endif() endif()
endif() endif()
set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
@ -557,29 +551,12 @@ if(MSVC)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries) include(InstallRequiredSystemLibraries)
if(NOT WITH_WAYK)
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION ${CMAKE_INSTALL_BINDIR} DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT libraries) COMPONENT libraries)
endif() 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_DISPLAY_NAME "Client")
set(CPACK_COMPONENT_CLIENT_GROUP "Applications") set(CPACK_COMPONENT_CLIENT_GROUP "Applications")
@ -607,4 +584,3 @@ endif()
include(CPack) include(CPack)
endif()

14
client/.gitignore vendored
View File

@ -1,4 +1,10 @@
WaykClient /*
!/Android
!/common
DotNetClient !/DirectFB
!/iOS
!/Mac
!/Sample
!/Windows
!/X11
!/CMakeLists.txt

View File

@ -0,0 +1,4 @@
set(FREERDP_CLIENT_NAME "afreerdp")
set(FREERDP_CLIENT_PLATFORM "Android")
set(FREERDP_CLIENT_VENDOR "FreeRDP")

View File

@ -51,10 +51,26 @@ if(ANDROID)
add_subdirectory(Android) add_subdirectory(Android)
endif() endif()
if(WITH_WAYK) # Pick up other clients
add_subdirectory(WaykClient)
endif()
if (WITH_DOTNET) set(FILENAME "ModuleOptions.cmake")
add_subdirectory(DotNetClient) 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()
endif()
endforeach()
foreach(FREERDP_CLIENT ${FREERDP_EXTRA_CLIENTS})
add_subdirectory(${FREERDP_CLIENT})
endforeach()

View File

@ -0,0 +1,4 @@
set(FREERDP_CLIENT_NAME "dfreerdp")
set(FREERDP_CLIENT_PLATFORM "DirectFB")
set(FREERDP_CLIENT_VENDOR "FreeRDP")

View File

@ -0,0 +1,4 @@
set(FREERDP_CLIENT_NAME "mfreerdp")
set(FREERDP_CLIENT_PLATFORM "MacOSX")
set(FREERDP_CLIENT_VENDOR "FreeRDP")

View File

@ -0,0 +1,4 @@
set(FREERDP_CLIENT_NAME "sfreerdp")
set(FREERDP_CLIENT_PLATFORM "Sample")
set(FREERDP_CLIENT_VENDOR "FreeRDP")

View File

@ -63,10 +63,8 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
if(WITH_CLIENT_INTERFACE) if(WITH_CLIENT_INTERFACE)
if (NOT WITH_WAYK)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
add_subdirectory(cli) add_subdirectory(cli)
endif()
else() else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client)
endif() endif()

View File

@ -0,0 +1,4 @@
set(FREERDP_CLIENT_NAME "wfreerdp")
set(FREERDP_CLIENT_PLATFORM "Windows")
set(FREERDP_CLIENT_VENDOR "FreeRDP")

View File

@ -0,0 +1,4 @@
set(FREERDP_CLIENT_NAME "xfreerdp")
set(FREERDP_CLIENT_PLATFORM "X11")
set(FREERDP_CLIENT_VENDOR "FreeRDP")

View File

@ -54,9 +54,7 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "") set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
if (NOT WITH_WAYK)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Common") set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Common")

View File

@ -0,0 +1,4 @@
set(FREERDP_CLIENT_NAME "ifreerdp")
set(FREERDP_CLIENT_PLATFORM "iOS")
set(FREERDP_CLIENT_VENDOR "FreeRDP")

10
server/.gitignore vendored
View File

@ -1,3 +1,7 @@
WaykServer /*
xrdp-ng !/common
!/Mac
!/Sample
!/Windows
!/X11
!/CmakeLists.txt

View File

@ -35,13 +35,28 @@ else()
add_subdirectory(Windows) add_subdirectory(Windows)
endif() 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") if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/xrdp-ng")
add_subdirectory("xrdp-ng") add_subdirectory("xrdp-ng")
endif() 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()

View File

@ -0,0 +1,4 @@
set(FREERDP_SERVER_NAME "mfreerdp-server")
set(FREERDP_SERVER_PLATFORM "X11")
set(FREERDP_SERVER_VENDOR "FreeRDP")

View File

@ -0,0 +1,4 @@
set(FREERDP_SERVER_NAME "sfreerdp-server")
set(FREERDP_SERVER_PLATFORM "Sample")
set(FREERDP_SERVER_VENDOR "FreeRDP")

View File

@ -0,0 +1,4 @@
set(FREERDP_SERVER_NAME "wfreerdp-server")
set(FREERDP_SERVER_PLATFORM "Windows")
set(FREERDP_SERVER_VENDOR "FreeRDP")

View File

@ -0,0 +1,4 @@
set(FREERDP_SERVER_NAME "xfreerdp-server")
set(FREERDP_SERVER_PLATFORM "X11")
set(FREERDP_SERVER_VENDOR "FreeRDP")