From 98443eb8f4c6554861b4ee944b468fd84d3e9301 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 6 Mar 2025 07:23:47 +0100 Subject: [PATCH] [cmake] drop deprecated clients when WITH_FREERDP_3x_DEPRECATED is OFF --- CMakeLists.txt | 11 ++++++++--- client/CMakeLists.txt | 8 +++++--- client/SDL/CMakeLists.txt | 28 ++++++++++++++++------------ 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcd102511..efb626912 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -397,7 +397,9 @@ if(ANDROID) set(PCSC_FEATURE_TYPE "DISABLED") endif() -find_feature(Wayland ${WAYLAND_FEATURE_TYPE} ${WAYLAND_FEATURE_PURPOSE} ${WAYLAND_FEATURE_DESCRIPTION}) +if(WITH_FREERDP_3x_DEPRECATED) + find_feature(Wayland ${WAYLAND_FEATURE_TYPE} ${WAYLAND_FEATURE_PURPOSE} ${WAYLAND_FEATURE_DESCRIPTION}) +endif() option(WITH_LIBRESSL "build with LibreSSL" OFF) if(WITH_LIBRESSL) @@ -527,9 +529,12 @@ include(CommonConfigOptions) if(FREERDP_UNIFIED_BUILD) add_subdirectory(winpr) - if(WITH_WAYLAND) - add_subdirectory(uwac) + if(WITH_FREERDP_3x_DEPRECATED) + if(WITH_WAYLAND) + add_subdirectory(uwac) + endif() endif() + if(WITH_SERVER) option(WITH_RDTK "build rdtk toolkit" ON) if(WITH_RDTK) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 761c6247f..ae384a795 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -47,9 +47,11 @@ if(FREERDP_VENDOR AND WITH_CLIENT) if(APPLE) if(IOS) - if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/iOS") - message(STATUS "Adding iOS client") - add_subdirectory(iOS) + if(WITH_FREERDP_3x_DEPRECATED) + if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/iOS") + message(STATUS "Adding iOS client") + add_subdirectory(iOS) + endif() endif() else() option(WITH_CLIENT_MAC "Build native mac client" ON) diff --git a/client/SDL/CMakeLists.txt b/client/SDL/CMakeLists.txt index 710cdf67d..0e8ace758 100644 --- a/client/SDL/CMakeLists.txt +++ b/client/SDL/CMakeLists.txt @@ -57,16 +57,18 @@ endif() include(CMakeDependentOption) -# Require 2.0.20 for ubuntu 22.04. -# older versions do not have the SDL2::SDL2 et al targets -find_package(SDL2 2.0.20) find_package(SDL3) cmake_dependent_option(WITH_CLIENT_SDL_VERSIONED "append sdl version to client binaries" OFF WITH_CLIENT_SDL OFF) -cmake_dependent_option( - WITH_CLIENT_SDL2 "[deprecated,experimental] build deprecated,experimental SDL2 client" ${SDL2_FOUND} WITH_CLIENT_SDL - OFF -) +if(WITH_FREERDP_3x_DEPRECATED) + # Require 2.0.20 for ubuntu 22.04. + # older versions do not have the SDL2::SDL2 et al targets + find_package(SDL2 2.0.20) + cmake_dependent_option( + WITH_CLIENT_SDL2 "[deprecated,experimental] build deprecated,experimental SDL2 client" ${SDL2_FOUND} + WITH_CLIENT_SDL OFF + ) +endif() cmake_dependent_option( WITH_CLIENT_SDL3 "[experimental] build experimental SDL3 client" ${SDL3_FOUND} WITH_CLIENT_SDL OFF ) @@ -85,11 +87,13 @@ if((WITH_CLIENT_SDL2 AND SDL2_FOUND) OR (WITH_CLIENT_SDL3 AND SDL3_FOUND)) include_directories(common) endif() -if(WITH_CLIENT_SDL2) - if(SDL2_FOUND) - add_subdirectory(SDL2) - else() - message(WARNING "SDL2 requested but not found, continuing build without SDL2 client") +if(WITH_FREERDP_3x_DEPRECATED) + if(WITH_CLIENT_SDL2) + if(SDL2_FOUND) + add_subdirectory(SDL2) + else() + message(WARNING "SDL2 requested but not found, continuing build without SDL2 client") + endif() endif() endif()