mirror of
https://github.com/wownero/wownero.git
synced 2026-12-03 06:24:11 +01:00
cmake: clean up libusb dependencies
This commit is contained in:
@@ -1010,24 +1010,6 @@ endif()
|
|||||||
|
|
||||||
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
|
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
|
||||||
|
|
||||||
if (HIDAPI_FOUND OR LibUSB_FOUND)
|
|
||||||
if (APPLE)
|
|
||||||
if(DEPENDS)
|
|
||||||
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework AppKit -framework IOKit -framework Security")
|
|
||||||
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()
|
|
||||||
endif()
|
|
||||||
if (WIN32)
|
|
||||||
list(APPEND EXTRA_LIBRARIES setupapi)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT OPENBSD)
|
if(NOT OPENBSD)
|
||||||
option(USE_READLINE "Build with GNU readline support." ON)
|
option(USE_READLINE "Build with GNU readline support." ON)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -97,27 +97,25 @@ endif ( LibUSB_FOUND )
|
|||||||
if ( LibUSB_FOUND )
|
if ( LibUSB_FOUND )
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
if(DEPENDS)
|
if(DEPENDS)
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit -framework Security")
|
list(APPEND LibUSB_LIBRARIES "-framework Foundation -framework IOKit -framework Security")
|
||||||
else()
|
else()
|
||||||
find_library(COREFOUNDATION CoreFoundation)
|
find_library(COREFOUNDATION CoreFoundation)
|
||||||
find_library(IOKIT IOKit)
|
find_library(IOKIT IOKit)
|
||||||
find_library(SECURITY_FRAMEWORK Security)
|
find_library(SECURITY_FRAMEWORK Security)
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
|
list(APPEND LibUSB_LIBRARIES ${IOKIT})
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
|
list(APPEND LibUSB_LIBRARIES ${COREFOUNDATION})
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${SECURITY_FRAMEWORK})
|
list(APPEND LibUSB_LIBRARIES ${SECURITY_FRAMEWORK})
|
||||||
|
|
||||||
if(STATIC)
|
if(STATIC)
|
||||||
find_library(OBJC objc.a)
|
find_library(OBJC objc.a)
|
||||||
set(LIBUSB_DEP_LINKER ${OBJC})
|
set(LIBUSB_DEP_LINKER ${OBJC})
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LIBUSB_DEP_LINKER})
|
list(APPEND LibUSB_LIBRARIES ${LIBUSB_DEP_LINKER})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES setupapi)
|
list(APPEND LibUSB_LIBRARIES setupapi)
|
||||||
endif()
|
endif()
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES})
|
|
||||||
|
|
||||||
if((STATIC AND UNIX AND NOT APPLE AND NOT FREEBSD AND NOT DEPENDS) OR ANDROID)
|
if((STATIC AND UNIX AND NOT APPLE AND NOT FREEBSD AND NOT DEPENDS) OR ANDROID)
|
||||||
find_library(LIBUDEV_LIBRARY udev)
|
find_library(LIBUDEV_LIBRARY udev)
|
||||||
|
|||||||
Reference in New Issue
Block a user