diff options
author | Antenore Gatta <antenore@simbiosi.org> | 2020-04-14 14:14:53 +0300 |
---|---|---|
committer | Antenore Gatta <antenore@simbiosi.org> | 2020-04-14 14:14:53 +0300 |
commit | 930847247b2a44666b62dbb12b1f62e84233b4bb (patch) | |
tree | 56a611a436b55fef8d34885f7c32ddb4107dd536 | |
parent | af88001350b506f5a7e9d7162ccaebc0bc5b354b (diff) |
Adding -DWITH_FREERDP3 compile option and using FreeRDP tag 2.0.0 as default
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | cmake/FindFREERDP3.cmake | 64 | ||||
-rw-r--r-- | flatpak/org.remmina.Remmina.json | 3 | ||||
-rw-r--r-- | plugins/CMakeLists.txt | 22 | ||||
-rw-r--r-- | plugins/rdp/CMakeLists.txt | 17 | ||||
-rw-r--r-- | snap/snapcraft.yaml | 2 |
6 files changed, 99 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 71297ea6a..59a3a9822 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ variables: DEB_PPA: "ppa:remmina-ppa-team/remmina-next" FREERDP_DAILY_PPA: "ppa:remmina-ppa-team/freerdp-daily" DOCKER_IMAGE: "ubuntu:bionic" - CMAKE_BUILD_OPTIONS: "-DCMAKE_BUILD_TYPE=Release -DWITH_APPINDICATOR=on" + CMAKE_BUILD_OPTIONS: "-DCMAKE_BUILD_TYPE=Release -DWITH_APPINDICATOR=on -DWITH_FREERDP3=OFF" FLATPAK_ARCH: x86_64 before_script: diff --git a/cmake/FindFREERDP3.cmake b/cmake/FindFREERDP3.cmake new file mode 100644 index 000000000..05d86c1c4 --- /dev/null +++ b/cmake/FindFREERDP3.cmake @@ -0,0 +1,64 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2011 Marc-Andre Moreau +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +find_package(PkgConfig) +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_FREERDP3 freerdp3>=${FREERDP_REQUIRED_VERSIONSTRING}) +endif() + +set(FREERDP3_DEFINITIONS ${PC_FREERDP3_CFLAGS_OTHER}) + +find_path(FREERDP3_INCLUDE_DIR NAMES freerdp/freerdp.h + HINTS ${PC_FREERDP3_INCLUDEDIR} ${PC_FREERDP3_INCLUDE_DIRS} ${CMAKE_PREFIX_PATH}/include/freerdp3/) + +find_path(WINPR_INCLUDE_DIR NAMES winpr/winpr.h + HINTS ${PC_FREERDP3_INCLUDEDIR} ${PC_FREERDP3_INCLUDE_DIRS} ${CMAKE_PREFIX_PATH}/include/winpr3/) + +find_library(FREERDP3_LIBRARY NAMES freerdp3 + HINTS ${PC_FREERDP3_LIBDIR} ${PC_FREERDP3_LIBRARY_DIRS}) + +if(NOT FREERDP3_LIBRARY) + find_library(FREERDP3_LIBRARY NAMES freerdp + HINTS ${PC_FREERDP3_LIBDIR} ${PC_FREERDP3_LIBRARY_DIRS}) +endif() + +find_library(FREERDP3_CLIENT_LIBRARY NAMES freerdp-client3 + HINTS ${PC_FREERDP3_LIBDIR} ${PC_FREERDP3_LIBRARY_DIRS}) + +if(NOT FREERDP3_CLIENT_LIBRARY) + find_library(FREERDP3_CLIENT_LIBRARY NAMES freerdp-client + HINTS ${PC_FREERDP3_LIBDIR} ${PC_FREERDP3_LIBRARY_DIRS}) +endif() + +find_library(FREERDP3_WINPR_LIBRARY NAMES winpr3 + HINTS ${PC_FREERDP3_LIBDIR} ${PC_FREERDP3_LIBRARY_DIRS}) + +if(NOT FREERDP3_WINPR_LIBRARY) + find_library(FREERDP3_WINPR_LIBRARY NAMES winpr + HINTS ${PC_FREERDP3_LIBDIR} ${PC_FREERDP3_LIBRARY_DIRS}) +endif() + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args(FREERDP3 DEFAULT_MSG FREERDP3_LIBRARY FREERDP3_INCLUDE_DIR) + +set(FREERDP3_LIBRARIES ${FREERDP3_LIBRARY} ${FREERDP3_CLIENT_LIBRARY} ${FREERDP3_WINPR_LIBRARY} ) +set(FREERDP3_INCLUDE_DIRS ${FREERDP3_INCLUDE_DIR} ${WINPR_INCLUDE_DIR}) + +mark_as_advanced(FREERDP3_INCLUDE_DIR FREERDP3_LIBRARY) diff --git a/flatpak/org.remmina.Remmina.json b/flatpak/org.remmina.Remmina.json index dbe72fb60..85aa7cae7 100644 --- a/flatpak/org.remmina.Remmina.json +++ b/flatpak/org.remmina.Remmina.json @@ -163,7 +163,8 @@ { "type": "git", "url": "https://github.com/FreeRDP/FreeRDP.git", - "branch": "master" + "tag": "2.0.0", + "commit": "5ab2bed8749747b8e4b2ed431fd102bc726be684" } ], "modules": [ diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 8c142cbd1..d08aa670d 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -33,11 +33,7 @@ # files in the program, then also delete it here. # Needed FreeRDP version to build freerdp plugin -set(FREERDP_REQUIRED_MAJOR 2) -set(FREERDP_REQUIRED_MINOR 0) -set(FREERDP_REQUIRED_REVISION 0) -set(FREERDP_REQUIRED_VERSIONSTRING - ${FREERDP_REQUIRED_MAJOR}.${FREERDP_REQUIRED_MINOR}.${FREERDP_REQUIRED_REVISION}) + include_directories(${CMAKE_SOURCE_DIR}/plugins) @@ -61,7 +57,21 @@ endif() add_subdirectory(xdmcp) -find_suggested_package(FREERDP) +set(FREERDP_REQUIRED_MAJOR 2) +set(FREERDP_REQUIRED_MINOR 0) +set(FREERDP_REQUIRED_REVISION 0) +set(FREERDP_REQUIRED_VERSIONSTRING + ${FREERDP_REQUIRED_MAJOR}.${FREERDP_REQUIRED_MINOR}.${FREERDP_REQUIRED_REVISION}) +option(WITH_FREERDP3 "Building RDP with FREERDP 3" OFF) +if(WITH_FREERDP3) + set(FREERDP_REQUIRED_MAJOR 3) + find_suggested_package(FREERDP3) + if(FREERDP3_FOUND) + set(FREERDP_FOUND FREERDP3_FOUND) + endif() +else() + find_suggested_package(FREERDP) +endif() if(FREERDP_FOUND) add_subdirectory(rdp) endif() diff --git a/plugins/rdp/CMakeLists.txt b/plugins/rdp/CMakeLists.txt index e53a2e497..db317c9c3 100644 --- a/plugins/rdp/CMakeLists.txt +++ b/plugins/rdp/CMakeLists.txt @@ -70,16 +70,27 @@ add_library(remmina-plugin-rdp MODULE ${REMMINA_PLUGIN_RDP_SRCS}) set_target_properties(remmina-plugin-rdp PROPERTIES PREFIX "") set_target_properties(remmina-plugin-rdp PROPERTIES NO_SONAME 1) -include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${FREERDP_INCLUDE_DIRS} ${X11_INCLUDE_DIR}) -target_link_libraries(remmina-plugin-rdp - ${REMMINA_COMMON_LIBRARIES} ${FREERDP_LIBRARIES} ${X11_LIBRARIES}) +if(WITH_FREERDP3) + include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${FREERDP3_INCLUDE_DIRS} ${X11_INCLUDE_DIR}) + target_link_libraries(remmina-plugin-rdp + ${REMMINA_COMMON_LIBRARIES} ${FREERDP3_LIBRARIES} ${X11_LIBRARIES}) +else() + include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${FREERDP_INCLUDE_DIRS} ${X11_INCLUDE_DIR}) + target_link_libraries(remmina-plugin-rdp + ${REMMINA_COMMON_LIBRARIES} ${FREERDP_LIBRARIES} ${X11_LIBRARIES}) +endif() if(CUPS_FOUND) add_definitions(-DHAVE_CUPS) include_directories(${CUPS_INCLUDE_DIR}) +if(WITH_FREERDP3) + target_link_libraries(remmina-plugin-rdp + ${REMMINA_COMMON_LIBRARIES} ${FREERDP3_LIBRARIES} ${X11_LIBRARIES} ${CUPS_LIBRARIES}) +else() target_link_libraries(remmina-plugin-rdp ${REMMINA_COMMON_LIBRARIES} ${FREERDP_LIBRARIES} ${X11_LIBRARIES} ${CUPS_LIBRARIES}) endif() +endif() install(TARGETS remmina-plugin-rdp DESTINATION ${REMMINA_PLUGINDIR}) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 12c7c930e..fc90065d0 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -49,6 +49,7 @@ parts: freerdp: plugin: cmake source: https://github.com/FreeRDP/FreeRDP.git + source-tag: 2.0.0 source-depth: 1 build-packages: - build-essential @@ -151,6 +152,7 @@ parts: - libzvbi0 configflags: - -DCMAKE_BUILD_TYPE=Release + - -DWITH_FREERDP3=OFF - -DCMAKE_PREFIX_PATH=$SNAPCRAFT_STAGE/usr - -DSNAP_BUILD=on |