Skip to content

[macOS] Remove unnecessary Cocoa reference. #1752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions cmake/macos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]=============================]
Expand All @@ -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()
8 changes: 0 additions & 8 deletions tools/macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down