public
Description: A cross-platform custom NOR firmware loader and custom IPSW generator for the iPhone
Homepage: http://planetbeing.lighthouseapp.com/projects/15246-xpwn
Clone URL: git://github.com/planetbeing/xpwn.git
planetbeing (author)
Sat Jul 18 01:19:36 -0700 2009
commit  5c8b07519892de6a3a057aa0755b2e368d2a47db
tree    e91e26b96f3ec9e52c741e83343bcc0971f90303
parent  35b51a01b0f1a0a711896000d8aa7e2660fc2faf
xpwn / FindUSB.cmake
100644 68 lines (57 sloc) 1.524 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# - Try to find USB
# Once done this will define
#
# USB_FOUND - system has USB
# USB_INCLUDE_DIRS - the USB include directory
# USB_LIBRARIES - Link these to use USB
# USB_DEFINITIONS - Compiler switches required for using USB
#
# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
 
 
if (USB_LIBRARIES AND USB_INCLUDE_DIRS)
  # in cache already
  set(USB_FOUND TRUE)
else (USB_LIBRARIES AND USB_INCLUDE_DIRS)
  find_path(USB_INCLUDE_DIR
    NAMES
      usb.h
    PATHS
      /usr/include
      /usr/local/include
      /opt/local/include
      /sw/include
  )
 
  find_library(USB_LIBRARY
    NAMES
      usb
    PATHS
      /usr/lib
      /usr/local/lib
      /opt/local/lib
      /sw/lib
  )
 
  set(USB_INCLUDE_DIRS
    ${USB_INCLUDE_DIR}
  )
  set(USB_LIBRARIES
    ${USB_LIBRARY}
)
 
  if (USB_INCLUDE_DIRS AND USB_LIBRARIES)
     set(USB_FOUND TRUE)
  endif (USB_INCLUDE_DIRS AND USB_LIBRARIES)
 
  if (USB_FOUND)
    if (NOT USB_FIND_QUIETLY)
      message(STATUS "Found USB: ${USB_LIBRARIES}")
    endif (NOT USB_FIND_QUIETLY)
  else (USB_FOUND)
    if (USB_FIND_REQUIRED)
      message(FATAL_ERROR "Could not find USB")
    endif (USB_FIND_REQUIRED)
  endif (USB_FOUND)
 
  # show the USB_INCLUDE_DIRS and USB_LIBRARIES variables only in the advanced view
  mark_as_advanced(USB_INCLUDE_DIRS USB_LIBRARIES)
 
endif (USB_LIBRARIES AND USB_INCLUDE_DIRS)