changed USE_SYS_LIBUSB to USE_SYSTEM_LIBUSB

This commit is contained in:
p01arst0rm 2021-05-03 21:08:26 +01:00 committed by Megamouse
parent c6c5faa95c
commit 1745c8c607
1 changed files with 4 additions and 4 deletions

View File

@ -60,11 +60,11 @@ add_subdirectory(pugixml EXCLUDE_FROM_ALL)
# libusb # libusb
if(CMAKE_SYSTEM MATCHES "DragonFly|FreeBSD") if(CMAKE_SYSTEM MATCHES "DragonFly|FreeBSD")
pkg_check_modules(LIBUSB REQUIRED IMPORTED_TARGET libusb-1.0>=1.0 ) pkg_check_modules(LIBUSB REQUIRED IMPORTED_TARGET libusb-1.0>=1.0 )
CMAKE_DEPENDENT_OPTION( USE_SYS_LIBUSB "Use system libusb-1.0 as shared library" ON CMAKE_DEPENDENT_OPTION( USE_SYSTEM_LIBUSB "Use system libusb-1.0 as shared library" ON
"LIBUSB_FOUND" OFF) "LIBUSB_FOUND" OFF)
else() else()
pkg_check_modules(LIBUSB IMPORTED_TARGET libusb-1.0>=1.0 ) pkg_check_modules(LIBUSB IMPORTED_TARGET libusb-1.0>=1.0 )
CMAKE_DEPENDENT_OPTION( USE_SYS_LIBUSB "Use system libusb-1.0 as shared library" OFF CMAKE_DEPENDENT_OPTION( USE_SYSTEM_LIBUSB "Use system libusb-1.0 as shared library" OFF
"LIBUSB_FOUND" OFF) "LIBUSB_FOUND" OFF)
endif() endif()
if(CMAKE_SYSTEM MATCHES "DragonFly|FreeBSD") if(CMAKE_SYSTEM MATCHES "DragonFly|FreeBSD")
@ -76,7 +76,7 @@ elseif(MSVC)
add_definitions(-DHAVE_STRUCT_TIMESPEC=1) add_definitions(-DHAVE_STRUCT_TIMESPEC=1)
add_subdirectory(libusb EXCLUDE_FROM_ALL) add_subdirectory(libusb EXCLUDE_FROM_ALL)
else() else()
if(USE_SYS_LIBUSB) if(USE_SYSTEM_LIBUSB)
# we have the system libusb and have selected to use it # we have the system libusb and have selected to use it
add_library(usb-1.0-shared INTERFACE) add_library(usb-1.0-shared INTERFACE)
target_link_libraries(usb-1.0-shared INTERFACE PkgConfig::LIBUSB) target_link_libraries(usb-1.0-shared INTERFACE PkgConfig::LIBUSB)
@ -418,7 +418,7 @@ endif()
add_subdirectory(curl EXCLUDE_FROM_ALL) add_subdirectory(curl EXCLUDE_FROM_ALL)
# add nice ALIAS targets for ease of use # add nice ALIAS targets for ease of use
if(USE_SYS_LIBUSB) if(USE_SYSTEM_LIBUSB)
add_library(3rdparty::libusb ALIAS usb-1.0-shared) add_library(3rdparty::libusb ALIAS usb-1.0-shared)
else() else()
add_library(3rdparty::libusb ALIAS usb-1.0-static) add_library(3rdparty::libusb ALIAS usb-1.0-static)