From d7f81a0b406877998aad1a78dec43a204dcc95d2 Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 11 Oct 2025 03:35:34 -0400 Subject: [PATCH] refactor(CMake): conditionally enable Objective-C support for macOS - Updated the CMake configuration to enable Objective-C language support only when building on macOS, improving cross-platform compatibility. - This change streamlines the project setup by ensuring that unnecessary languages are not included in non-macOS environments. Benefits: - Enhanced portability of the build system. - Reduced complexity in project configuration for non-macOS platforms. --- CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a47bfa61..5839ea3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,9 +7,16 @@ cmake_policy(SET CMP0091 NEW) cmake_policy(SET CMP0048 NEW) cmake_policy(SET CMP0077 NEW) -project(yaze VERSION 0.3.2 - DESCRIPTION "Yet Another Zelda3 Editor" - LANGUAGES CXX C OBJC OBJCXX) +# Enable Objective-C only on macOS where it's actually used +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + project(yaze VERSION 0.3.2 + DESCRIPTION "Yet Another Zelda3 Editor" + LANGUAGES CXX C OBJC OBJCXX) +else() + project(yaze VERSION 0.3.2 + DESCRIPTION "Yet Another Zelda3 Editor" + LANGUAGES CXX C) +endif() # Enable ccache for faster rebuilds if available find_program(CCACHE_FOUND ccache)