Merge pull request #7687

cb9a2e4 add -framework AppKit for Apple (woodser)
This commit is contained in:
luigi1111 2021-05-12 16:57:02 -05:00
commit 90703ba8bd
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
1 changed files with 3 additions and 1 deletions

View File

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