mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-06 06:10:06 +03:00
Merge pull request #1752 from bruvzg/rem_libs
[macOS] Remove unnecessary Cocoa reference.
This commit is contained in:
@@ -17,14 +17,6 @@ https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html
|
|||||||
# Find Requirements
|
# Find Requirements
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CMAKE_OSX_SYSROOT $ENV{SDKROOT})
|
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)
|
endif(APPLE)
|
||||||
|
|
||||||
#[=============================[ MacOS Options ]=============================]
|
#[=============================[ MacOS Options ]=============================]
|
||||||
@@ -45,9 +37,5 @@ endfunction()
|
|||||||
function(macos_generate)
|
function(macos_generate)
|
||||||
target_compile_definitions(godot-cpp PUBLIC MACOS_ENABLED UNIX_ENABLED)
|
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()
|
common_compiler_flags()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|||||||
@@ -63,14 +63,6 @@ def generate(env):
|
|||||||
env.Append(CCFLAGS=["-isysroot", env["macos_sdk_path"]])
|
env.Append(CCFLAGS=["-isysroot", env["macos_sdk_path"]])
|
||||||
env.Append(LINKFLAGS=["-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"])
|
env.Append(CPPDEFINES=["MACOS_ENABLED", "UNIX_ENABLED"])
|
||||||
|
|
||||||
# Refer to https://github.com/godotengine/godot/blob/master/platform/macos/detect.py
|
# Refer to https://github.com/godotengine/godot/blob/master/platform/macos/detect.py
|
||||||
|
|||||||
Reference in New Issue
Block a user