11diff --git a/CMakeLists.txt b/CMakeLists.txt
2- index 4f002b5..d48f3f2 100644
2+ index 4f002b5..dd9b1df 100644
33--- a/CMakeLists.txt
44+++ b/CMakeLists.txt
55@@ -27,8 +27,6 @@ option(K4A_BUILD_DOCS "Build K4A doxygen documentation" OFF)
@@ -11,7 +11,7 @@ index 4f002b5..d48f3f2 100644
1111 # Set the project version
1212 include(K4AProjectVersion)
1313
14- @@ -100,6 +98,43 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL
14+ @@ -100,6 +98,42 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL
1515 set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
1616 endif()
1717
@@ -34,14 +34,13 @@ index 4f002b5..d48f3f2 100644
3434+ add_definitions(-DMATROSKA_VERSION=2)
3535+ find_package(libsoundio CONFIG REQUIRED)
3636+ if (NOT WIN32)
37- + find_package(libusb CONFIG REQUIRED)
3837+ find_package(libuvc CONFIG REQUIRED)
3938+ add_library(libuvc::libuvc ALIAS LibUVC::UVCStatic)
4039+ find_package(OpenSSL REQUIRED)
4140+ find_package(ZLIB REQUIRED)
42- + else()
43- + find_library(LibUSB libusb-1.0 REQUIRED)
4441+ endif()
42+ + FIND_PACKAGE(PkgConfig REQUIRED)
43+ + pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0)
4544+ find_package(libyuv CONFIG REQUIRED)
4645+ find_package(spdlog CONFIG REQUIRED)
4746+ if (BUILD_TOOLS)
@@ -295,7 +294,7 @@ index e4a696e..6ee6696 100644
295294 k4ainternal::deloader)
296295
297296diff --git a/src/usbcommand/CMakeLists.txt b/src/usbcommand/CMakeLists.txt
298- index f75bd55..5403216 100644
297+ index f75bd55..7130728 100644
299298--- a/src/usbcommand/CMakeLists.txt
300299+++ b/src/usbcommand/CMakeLists.txt
301300@@ -12,8 +12,8 @@ target_include_directories(k4a_usb_cmd PUBLIC
@@ -305,7 +304,7 @@ index f75bd55..5403216 100644
305304- azure::aziotsharedutil
306305- LibUSB::LibUSB
307306+ aziotsharedutil
308- + ${LibUSB}
307+ + PkgConfig::libusb
309308 k4ainternal::allocator
310309 k4ainternal::image
311310 k4ainternal::logging)
@@ -585,7 +584,7 @@ index c544e1e..9489bf8 100644
585584 k4ainternal::logging
586585 k4ainternal::utcommon)
587586diff --git a/tools/k4aviewer/CMakeLists.txt b/tools/k4aviewer/CMakeLists.txt
588- index 98578c0..6ab38d9 100644
587+ index 98578c0..244c867 100644
589588--- a/tools/k4aviewer/CMakeLists.txt
590589+++ b/tools/k4aviewer/CMakeLists.txt
591590@@ -60,10 +60,11 @@ set(EXTERNAL_LIBRARIES
@@ -595,7 +594,7 @@ index 98578c0..6ab38d9 100644
595594- LibUSB::LibUSB
596595- libyuv::libyuv
597596- glfw::glfw
598- + ${LibUSB}
597+ + PkgConfig::libusb
599598+ yuv
600599+ glfw
601600 ${OPENGL_LIBRARIES}
0 commit comments