aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2026-02-23 23:54:33 +0100
committerPřemysl Eric Janouch <p@janouch.name>2026-03-02 04:08:27 +0100
commitcdff879900779477a6b9ed020fb390b2484bd525 (patch)
tree95ea3d7d6f9ef3e889fde91a808b9d29cef4ba9b /CMakeLists.txt
parent6aa822fe34510780d9dffbee8e847fc951d9096c (diff)
downloadnncmpp-cdff879900779477a6b9ed020fb390b2484bd525.tar.gz
nncmpp-cdff879900779477a6b9ed020fb390b2484bd525.tar.xz
nncmpp-cdff879900779477a6b9ed020fb390b2484bd525.zip
WIP: AppKitHEADmaster
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
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})