From d239da32219dc2c9b9958cebef49256fa2ff4d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Fri, 28 Mar 2025 08:45:43 +0200 Subject: [PATCH] [macOS] Remove unnecessary Cocoa reference. --- cmake/macos.cmake | 12 ------------ tools/macos.py | 8 -------- 2 files changed, 20 deletions(-) diff --git a/cmake/macos.cmake b/cmake/macos.cmake index 7f8038210..33db862d7 100644 --- a/cmake/macos.cmake +++ b/cmake/macos.cmake @@ -17,14 +17,6 @@ https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html # Find Requirements if(APPLE) set(CMAKE_OSX_SYSROOT $ENV{SDKROOT}) - find_library( - COCOA_LIBRARY - REQUIRED - NAMES Cocoa - PATHS ${CMAKE_OSX_SYSROOT}/System/Library - PATH_SUFFIXES Frameworks - NO_DEFAULT_PATH - ) endif(APPLE) #[=============================[ MacOS Options ]=============================] @@ -45,9 +37,5 @@ endfunction() function(macos_generate) target_compile_definitions(godot-cpp PUBLIC MACOS_ENABLED UNIX_ENABLED) - target_link_options(godot-cpp PUBLIC -Wl,-undefined,dynamic_lookup) - - target_link_libraries(godot-cpp INTERFACE ${COCOA_LIBRARY}) - common_compiler_flags() endfunction() diff --git a/tools/macos.py b/tools/macos.py index f88e47ff1..541249cb4 100644 --- a/tools/macos.py +++ b/tools/macos.py @@ -63,14 +63,6 @@ def generate(env): env.Append(CCFLAGS=["-isysroot", env["macos_sdk_path"]]) env.Append(LINKFLAGS=["-isysroot", env["macos_sdk_path"]]) - env.Append( - LINKFLAGS=[ - "-framework", - "Cocoa", - "-Wl,-undefined,dynamic_lookup", - ] - ) - env.Append(CPPDEFINES=["MACOS_ENABLED", "UNIX_ENABLED"]) # Refer to https://github.com/godotengine/godot/blob/master/platform/macos/detect.py