From cdff879900779477a6b9ed020fb390b2484bd525 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Mon, 23 Feb 2026 23:54:33 +0100 Subject: WIP: AppKit --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 93df5e8..7e0f6c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,15 @@ if (WITH_PULSE) list (APPEND extra_libraries ${libpulse_LIBRARIES}) endif () +add_option (WITH_APPKIT "Build with AppKit support" "${APPLE}") +if (WITH_APPKIT) + enable_language (OBJC) + set (CMAKE_OBJC_FLAGS + "${CMAKE_OBJC_FLAGS} -std=gnu99 -Wall -Wextra -Wno-unused-function") + list (APPEND extra_libraries + "-framework AppKit" "-framework CoreFoundation") +endif () + pkg_check_modules (x11 x11 xrender xft fontconfig libpng) add_option (WITH_X11 "Build with X11 support" "${x11_FOUND}") if (WITH_X11) @@ -120,6 +129,9 @@ add_custom_command (OUTPUT ${actions} # Build the main executable and link it add_executable (${PROJECT_NAME} ${PROJECT_NAME}.c ${actions}) +if (WITH_APPKIT) + set_source_files_properties (${PROJECT_NAME}.c PROPERTIES LANGUAGE OBJC) +endif () target_link_libraries (${PROJECT_NAME} ${Unistring_LIBRARIES} ${Ncursesw_LIBRARIES} ${Termo_LIBRARIES} ${curl_LIBRARIES} ${extra_libraries}) -- cgit v1.2.3-70-g09d2