From 2d1bd00bf04274358aed15b5652e67187424a424 Mon Sep 17 00:00:00 2001
From: Josh Blum <josh@joshknows.com>
Date: Mon, 28 Mar 2011 23:41:01 -0700
Subject: usb: changes to allow for static linking of libusb on windows

---
 host/lib/transport/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'host/lib')

diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt
index a5bf9c5f1..656ca9987 100644
--- a/host/lib/transport/CMakeLists.txt
+++ b/host/lib/transport/CMakeLists.txt
@@ -31,6 +31,10 @@ IF(ENABLE_USB)
     MESSAGE(STATUS "USB support enabled via libusb.")
     INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR})
     LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES})
+    IF(WIN32)
+        #needed when statically linking libusb
+        LIBUHD_APPEND_LIBS(Setupapi.lib)
+    ENDIF(WIN32)
     LIBUHD_APPEND_SOURCES(
         ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_control.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_zero_copy.cpp
-- 
cgit v1.2.3