From 287ff990eaf640f807bd3a26e3dc193815e1e971 Mon Sep 17 00:00:00 2001 From: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> Date: Thu, 16 Nov 2023 19:44:35 +0100 Subject: [PATCH] macOS include AppKit --- libsrc/events/CMakeLists.txt | 9 +-------- libsrc/events/OsEventHandler.cpp | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/libsrc/events/CMakeLists.txt b/libsrc/events/CMakeLists.txt index d15a4f10..ec3a023d 100644 --- a/libsrc/events/CMakeLists.txt +++ b/libsrc/events/CMakeLists.txt @@ -16,17 +16,10 @@ endif() target_link_libraries(events hyperion-utils - Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets ) if(APPLE) - find_library(FOUNDATION_LIBRARY Foundation REQUIRED) set_source_files_properties(OsEventHandler.cpp PROPERTIES COMPILE_FLAGS "-x objective-c++") - target_link_libraries(events ${FOUNDATION_LIBRARY}) - target_include_directories(events PRIVATE ${FOUNDATION_LIBRARY}) + target_link_libraries(events "-framework AppKit") endif() - - - - diff --git a/libsrc/events/OsEventHandler.cpp b/libsrc/events/OsEventHandler.cpp index f90541ec..59370dfe 100644 --- a/libsrc/events/OsEventHandler.cpp +++ b/libsrc/events/OsEventHandler.cpp @@ -17,7 +17,7 @@ #pragma comment( lib, "wtsapi32.lib" ) #elif defined(__APPLE__) -#import <Cocoa/Cocoa.h> +#include <AppKit/AppKit.h> #endif OsEventHandlerBase::OsEventHandlerBase()