Merge pull request #7074

9024622 add -framework AppKit for Apple (woodser)
This commit is contained in:
luigi1111 2020-12-19 17:18:53 -06:00
commit b8e4b69915
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -973,10 +973,12 @@ list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED) if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
if (APPLE) if (APPLE)
if(DEPENDS) if(DEPENDS)
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework IOKit") list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework AppKit -framework IOKit")
else() else()
find_library(COREFOUNDATION CoreFoundation) find_library(COREFOUNDATION CoreFoundation)
find_library(APPKIT AppKit)
find_library(IOKIT IOKit) find_library(IOKIT IOKit)
list(APPEND EXTRA_LIBRARIES ${APPKIT})
list(APPEND EXTRA_LIBRARIES ${IOKIT}) list(APPEND EXTRA_LIBRARIES ${IOKIT})
list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION}) list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION})
endif() endif()