Use the required frameworks.
https://github.com/wesnoth/wesnoth/pull/6758
--- CMakeLists.txt.orig	2022-05-29 10:04:52.000000000 -0500
+++ CMakeLists.txt	2022-06-08 14:43:54.000000000 -0500
@@ -66,6 +66,8 @@
 find_package(OpenSSL 1.0 REQUIRED)
 
 if(APPLE)
+	find_library(APPKIT_LIBRARY AppKit REQUIRED)
+	find_library(FOUNDATION_LIBRARY Foundation REQUIRED)
 	find_library(IOKIT_LIBRARY IOKit REQUIRED)
 	find_library(SECURITY_LIBRARY Security REQUIRED)
 endif()
--- src/CMakeLists.txt.orig	2022-05-29 10:04:52.000000000 -0500
+++ src/CMakeLists.txt	2022-06-08 14:44:36.000000000 -0500
@@ -45,7 +45,7 @@
 elseif(MINGW)
 	set(common-external-libs ${common-external-libs} wsock32 ws2_32 shlwapi winmm)
 elseif(APPLE)
-	set(common-external-libs ${common-external-libs} ${IOKIT_LIBRARY} ${SECURITY_LIBRARY})
+	set(common-external-libs ${common-external-libs} ${APPKIT_LIBRARY} ${FOUNDATION_LIBRARY} ${IOKIT_LIBRARY} ${SECURITY_LIBRARY})
 endif()
 
 set(game-external-libs
