From a946c7c6605fa4aa6ea7e74e0c4b55db7d6c38f2 Mon Sep 17 00:00:00 2001 From: Chris Moos Date: Fri, 18 Mar 2022 17:07:49 -0700 Subject: [PATCH] Fix issue building on latest MacOS 12.1 with Apple Silicon. Security framework added to linker flags due to build error: Undefined symbols for architecture arm64: "_SecTaskCopyValueForEntitlement", referenced from: _darwin_detach_kernel_driver in libusb-1.0.a(darwin_usb.o) "_SecTaskCreateFromSelf", referenced from: _darwin_detach_kernel_driver in libusb-1.0.a(darwin_usb.o) ld: symbol(s) not found for architecture arm64 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9adf59..1dc4358 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ if (BUILD_STATICLIB) endif() if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework CoreFoundation -framework IOKit") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework CoreFoundation -framework IOKit -framework Security") endif()