Skip to content

Commit b0d50ba

Browse files
authored
Merge pull request #514 from thp/thp/libusb-fine-grained
Only pull in libusb/libusb-1.0 for their respective features (fixes #509)
2 parents 542161c + 69d325a commit b0d50ba

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/utils/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,19 @@ if (PSMOVE_BUILD_TRACKER)
1414
target_link_libraries(psmove psmoveapi_tracker)
1515
endif()
1616

17-
if (PSMOVE_USE_SIXPAIR OR PSMOVE_BUILD_TRACKER)
18-
if (WIN32)
19-
include(${CMAKE_CURRENT_LIST_DIR}/libusb.cmake)
20-
target_link_libraries(psmove ${LIBUSB_LIBRARIES})
21-
else()
17+
if (WIN32)
18+
include(${CMAKE_CURRENT_LIST_DIR}/libusb.cmake)
19+
target_link_libraries(psmove ${LIBUSB_LIBRARIES})
20+
else()
21+
if (PSMOVE_USE_SIXPAIR)
2222
# sixpair needs libusb
2323
find_package(PkgConfig REQUIRED)
2424
pkg_check_modules(LIBUSB REQUIRED libusb QUIET)
2525
include_directories(${LIBUSB_INCLUDE_DIRS})
2626
target_link_libraries(psmove ${LIBUSB_LIBRARIES})
27+
endif()
2728

29+
if (PSMOVE_BUILD_TRACKER)
2830
# ps4/ps5 cams need libusb-1.0
2931
find_package(PkgConfig REQUIRED)
3032
pkg_check_modules(LIBUSB REQUIRED libusb-1.0 QUIET)

0 commit comments

Comments
 (0)