From 94b066185f9fa1df61f6986ce6a9e52d5f4833c9 Mon Sep 17 00:00:00 2001 From: fwcd Date: Mon, 4 Mar 2024 00:00:19 +0100 Subject: [PATCH] CMakeLists: Emit better errors for exotic target platforms --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf44b174833..8f33a0fac3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,14 +54,18 @@ function(FATAL_ERROR_MISSING_ENV) else() message(FATAL_ERROR "Did you download the Mixxx build environment using `${CMAKE_SOURCE_DIR}/tools/windows_release_buildenv.bat` or `${CMAKE_SOURCE_DIR}/tools/windows_buildenv.bat`(includes Debug)?") endif() - elseif(APPLE) + elseif(APPLE AND NOT IOS) if(CMAKE_BUILD_TYPE MATCHES "Debug") message(FATAL_ERROR "Did you download the Mixxx build environment using `${CMAKE_SOURCE_DIR}/tools/macos_buildenv.sh`") else() message(FATAL_ERROR "Did you download the Mixxx build environment using `${CMAKE_SOURCE_DIR}/tools/macos_release_buildenv.sh` or `${CMAKE_SOURCE_DIR}/tools/macos_buildenv.sh`(includes Debug)?") endif() - else() + elseif(LINUX) message(FATAL_ERROR "Did you install the Debian dev packages via `${CMAKE_SOURCE_DIR}/tools/debian_buildenv.sh` or the equivalent packages using your package manager?") + elseif(DEFINED VCPKG_TARGET_TRIPLET) + message(FATAL_ERROR "You are targeting ${VCPKG_TARGET_TRIPLET}, which does not have a prebuilt environment. Please make sure that -DMIXXX_VCPKG_ROOT points to a vcpkg environment containing installed dependencies for ${VCPKG_TARGET_TRIPLET}!") + else() + message(FATAL_ERROR "You are building for an unknown platform and are missing a build environment. Please set -DVCPKG_TARGET_TRIPLET and make sure that -DMIXXX_VCPKG_ROOT points to a vcpkg environment containing installed dependencies for your target platform!") endif() endfunction()