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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user