From 1e144a7cfd2c31f955de83fa73428070d4b0f7c3 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Thu, 6 Nov 2025 02:31:43 -0600 Subject: [PATCH] CMakeLists: Fix build on Linux with CMake versions less than 3.25. --- CMakeLists.txt | 4 ++++ Source/Core/Core/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77eb170452a..77ceff3bda9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,10 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR}/CMake/FlagsOverr project(dolphin-emu) +if (CMAKE_VERSION VERSION_LESS "3.25" AND CMAKE_SYSTEM_NAME MATCHES "Linux") + set(LINUX TRUE) +endif() + if (MSVC) if (POLICY CMP0117) # cmake is a weird language. You can't do if(not POLICY) diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index cb2a3ac58ab..c898c8f693e 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -755,7 +755,7 @@ elseif(UNIX) endif() # Bluez doesn't support all the communication modes on FreeBSD, so only using it on Linux -if(CMAKE_SYSTEM_NAME MATCHES "Linux") +if(LINUX) option(ENABLE_BLUEZ "Enables bluetooth support" ON) if(ENABLE_BLUEZ) find_package(BlueZ)