Bug#737153: OpenCVModules.cmake not installed, causing visp FTBFS

Fabien Spindler Fabien.Spindler at inria.fr
Wed Feb 19 09:48:59 UTC 2014


Le 19/02/14 09:59, Fabien Spindler a écrit :
> Le 19/02/14 09:32, Thomas Moulard a écrit :
>> On Wed, Feb 19, 2014 at 3:43 PM, Nobuhiro Iwamatsu<iwamatsu at nigauri.org>  wrote:
>>> Hi,
>>>
>>> I just upload opencv 2.4.8+dfsg1-2.
>>> This version fixes a problem that can not be build applications using opencv.
>>> But visp has other build error by libusb.h in /usr/include/libfreenect.hpp.
>>> Could you check this problem?
>> Hi,
>> thank you for fixing the bug!
>>
>> I cannot reproduce the problem (builds fine on my local pbuilder).
>> Is it architecture specific? Could you please attach the log on your machine?
>
> I'm able to reproduce the bug. It comes when package libusb-1.0-0-dev 
> package is installed.
> I will fix the issue and send the patch.
>
> Fabien

Attached is the patch for ViSP 2.8.0.

Fabien

>> Best,
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20140219/e97bab41/attachment-0001.html>
-------------- next part --------------
Index: CMakeModules/FindLIBUSB-1.cmake
===================================================================
--- CMakeModules/FindLIBUSB-1.cmake	(revision 4677)
+++ CMakeModules/FindLIBUSB-1.cmake	(working copy)
@@ -35,6 +35,7 @@
 #
 # LIBUSB_1_FOUND
 # LIBUSB_1_LIBRARIES
+# LIBUSB_1_INCLUDE_DIRS
 #
 # Authors:
 # Celine Teuliere
@@ -55,11 +56,18 @@
     /usr/lib
     /usr/local/lib
     )
+  FIND_PATH(LIBUSB_1_INCLUDE_DIR libusb.h
+    $ENV{LIBUSB_1_HOME}/include/libusb-1.0
+    $ENV{LIBUSB_1_HOME}/build/include/libusb-1.0
+    /usr/include/libusb-1.0
+    /usr/local/include/libusb-1.0
+    )
 ENDIF(WIN32)
 
 ## --------------------------------
 
-IF(LIBUSB_1_LIBRARY)
+IF(LIBUSB_1_LIBRARY AND LIBUSB_1_INCLUDE_DIR)
+  SET(LIBUSB_1_INCLUDE_DIRS ${LIBUSB_1_INCLUDE_DIR})
   SET(LIBUSB_1_LIBRARIES ${LIBUSB_1_LIBRARY})
   SET(LIBUSB_1_FOUND TRUE)
 ELSE()
@@ -67,6 +75,8 @@
 ENDIF()
 
 MARK_AS_ADVANCED(
+  LIBUSB_1_INCLUDE_DIRS
+  LIBUSB_1_INCLUDE_DIR
   LIBUSB_1_LIBRARIES
   LIBUSB_1_LIBRARY
   )
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 4677)
+++ CMakeLists.txt	(working copy)
@@ -1073,6 +1073,7 @@
  
     MESSAGE(STATUS "libusb-1.0 found")
  
+    LIST(APPEND VISP_EXTERN_INCLUDE_DIRS ${LIBUSB_1_INCLUDE_DIRS})
     LIST(APPEND VISP_EXTERN_LIBRARIES ${LIBUSB_1_LIBRARIES})
   ELSE()
     MESSAGE(STATUS "libusb-1.0 not found")
@@ -1089,7 +1090,7 @@
     # The material is found. Check if libfreenect is an old version
     include(CheckCXXSourceCompiles)
     SET(CMAKE_REQUIRED_LIBRARIES ${LIBFREENECT_LIBRARIES} ${PTHREAD_LIBRARIES} ${LIBUSB_1_LIBRARIES})
-    SET(CMAKE_REQUIRED_INCLUDES ${LIBFREENECT_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS})
+    SET(CMAKE_REQUIRED_INCLUDES ${LIBFREENECT_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${LIBUSB_1_INCLUDE_DIRS})
     CHECK_CXX_SOURCE_COMPILES("
       #include <libfreenect.hpp>
 


More information about the debian-science-maintainers mailing list