diff --git a/client/experimental_lib/CMakeLists.txt b/client/experimental_lib/CMakeLists.txt index c8a6bb02f..60e7b4004 100644 --- a/client/experimental_lib/CMakeLists.txt +++ b/client/experimental_lib/CMakeLists.txt @@ -380,13 +380,23 @@ message(STATUS "CMAKE_SYSTEM_PROCESSOR := ${CMAKE_SYSTEM_PROCESSOR}") if (APPLE) message(STATUS "Apple device detected.") set(ADDITIONAL_SRC ${PM3_ROOT}/client/src/util_darwin.h ${PM3_ROOT}/client/src/util_darwin.m ${ADDITIONAL_SRC}) - if (EXISTS /private/var/mobile) - message(STATUS "iOS detected.") + + find_library(UIKIT_LIBRARY UIKit) + if (NOT UIKIT_LIBRARY) + message(STATUS "UIKit.framework NOT found!") + else() + message(STATUS "UIKit.framework found! ${UIKIT_LIBRARY}") set(ADDITIONAL_LNK "-framework Foundation" "-framework UIKit") - else (EXISTS /private/var/mobile) - message(STATUS "macOS detected.") - set(ADDITIONAL_LNK "-framework Foundation" "-framework AppKit") - endif (EXISTS /private/var/mobile) + endif() + + find_library(APPKIT_LIBRARY AppKit) + if (NOT APPKIT_LIBRARY) + message(STATUS "AppKit.framework NOT found!") + else() + message(STATUS "AppKit.framework found! ${APPKIT_LIBRARY}") + set(ADDITIONAL_LNK "-framework Foundation" "-framework AppKit") + endif() + endif (APPLE) if ((NOT SKIPQT EQUAL 1) AND (Qt5_FOUND))