libftdi-git Archives

Subject: port libftdi to libusb-1.0 branch, master, updated. v0.17-14-g5cc2b9c

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 15 Feb 2010 10:09:49 +0100 (CET)
The branch, master has been updated
       via  5cc2b9c1cf646f98914ff5785f6f3fb994c334d1 (commit)
       via  5478cd5944da978707c0c23c5c7a84554a0ea6f7 (commit)
      from  2e685a1f8377ffdb1167262e4d87ea78a5b83d18 (commit)


- Log -----------------------------------------------------------------
commit 5cc2b9c1cf646f98914ff5785f6f3fb994c334d1
Author: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date:   Tue Feb 2 17:31:08 2010 +0100

    libftdi(-1): Add cmake option to enable ASYNC_MODE
    
    Appended patch allows to openm async mode with something like
    cmake -DASYNC-MODE=on
    
    It should apply to libusb too.

commit 5478cd5944da978707c0c23c5c7a84554a0ea6f7
Author: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date:   Tue Feb 2 18:52:37 2010 +0100

    We need to find libusb-1, so adapt the CMake support files

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt |    7 ++++++-
 FindUSB.cmake  |   38 --------------------------------------
 FindUSB1.cmake |   38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 39 deletions(-)
 delete mode 100644 FindUSB.cmake
 create mode 100644 FindUSB1.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3595198..3e6c96d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,11 @@ set(MINOR_VERSION 17)
 set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION})
 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
 
+option(ASYNC-MODE "enable experimental async mode. Linux only")
+if(ASYNC-MODE)
+  add_definitions(-DLIBFTDI_LINUX_ASYNC_MODE)
+endif(ASYNC-MODE)
+
 # CMake
 if("${CMAKE_BUILD_TYPE}" STREQUAL "")
    set(CMAKE_BUILD_TYPE     Debug)
@@ -18,7 +23,7 @@ if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
    add_definitions(-DDEBUG)
 endif(${CMAKE_BUILD_TYPE} STREQUAL Debug)
 
-FIND_PACKAGE(USB REQUIRED)
+FIND_PACKAGE(USB1 REQUIRED)
 INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR})
 
 # Set components
diff --git a/FindUSB.cmake b/FindUSB.cmake
deleted file mode 100644
index 566cdd8..0000000
--- a/FindUSB.cmake
+++ /dev/null
@@ -1,38 +0,0 @@
-# - Try to find the freetype library
-# Once done this defines
-#
-#  LIBUSB_FOUND - system has libusb
-#  LIBUSB_INCLUDE_DIR - the libusb include directory
-#  LIBUSB_LIBRARIES - Link these to use libusb
-
-# Copyright (c) 2006, 2008  Laurent Montel, <montel@xxxxxxx>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-if (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
-
-  # in cache already
-  set(LIBUSB_FOUND TRUE)
-
-else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
-  IF (NOT WIN32)
-    # use pkg-config to get the directories and then use these values
-    # in the FIND_PATH() and FIND_LIBRARY() calls
-    find_package(PkgConfig)
-    pkg_check_modules(PC_LIBUSB libusb)
-  ENDIF(NOT WIN32)
-
-  FIND_PATH(LIBUSB_INCLUDE_DIR usb.h
-    PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
-
-  FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb 
-    PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
-
-  include(FindPackageHandleStandardArgs)
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES 
LIBUSB_INCLUDE_DIR)
-
-  MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
-
-endif (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
diff --git a/FindUSB1.cmake b/FindUSB1.cmake
new file mode 100644
index 0000000..ebcac99
--- /dev/null
+++ b/FindUSB1.cmake
@@ -0,0 +1,38 @@
+# - Try to find the freetype library
+# Once done this defines
+#
+#  LIBUSB_FOUND - system has libusb
+#  LIBUSB_INCLUDE_DIR - the libusb include directory
+#  LIBUSB_LIBRARIES - Link these to use libusb
+
+# Copyright (c) 2006, 2008  Laurent Montel, <montel@xxxxxxx>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
+
+  # in cache already
+  set(LIBUSB_FOUND TRUE)
+
+else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
+  IF (NOT WIN32)
+    # use pkg-config to get the directories and then use these values
+    # in the FIND_PATH() and FIND_LIBRARY() calls
+    find_package(PkgConfig)
+    pkg_check_modules(PC_LIBUSB libusb-1.0)
+  ENDIF(NOT WIN32)
+
+  FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h
+    PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
+
+  FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0
+    PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
+
+  include(FindPackageHandleStandardArgs)
+  FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES 
LIBUSB_INCLUDE_DIR)
+
+  MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
+
+endif (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)


hooks/post-receive
-- 
port libftdi to libusb-1.0

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • port libftdi to libusb-1.0 branch, master, updated. v0.17-14-g5cc2b9c, libftdi-git <=