title: Compile issues: LIBUSB_1 with cmake project on Windows
body: <p><strong>First Attempt</strong></p>
  
  <p>In my cmake/c++ project I get the following error when compiling:</p>
  
  <pre><code>C:\local\projects\synergy-usb\synergy-through-usb-master&gt;cmake .
  You have called ADD_LIBRARY for library cryptopp without any source files. This typically indicates a problem with your CMakeLists.txt file
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  LIBUSB_1_INCLUDE_DIR
     used as include directory in directory C:/local/projects/synergy-usb/synergy-through-usb-master/src/lib/arch
     used as include directory in directory C:/local/projects/synergy-usb/synergy-through-usb-master/src/lib/net
  LIBUSB_1_LIBRARY
      linked by target "arch" in directory C:/local/projects/synergy-usb/synergy-through-usb-master/src/lib/arch
  
  -- Configuring incomplete, errors occurred!
  See also "C:/local/projects/synergy-usb/synergy-through-usb-master/CMakeFiles/CMakeOutput.log".
  </code></pre>
  
  <p>So I am missing libusb libraries.</p>
  
  <p><strong>Second Attempt</strong></p>
  
  <p>So now I have found a version of libusb_1 (libusbx-1.0.18-win) which includes the folders:</p>
  
  <ul>
  <li>examples</li>
  <li>include</li>
  <li>MinGW32</li>
  <li>MinGW64</li>
  <li>MS32</li>
  <li>MS64</li>
  </ul>
  
  <p>I copied MS64/dll (windows 64-bit) contents and put it here:</p>
  
  <pre><code>C:\local\libs\libusbx
  </code></pre>
  
  <p>I added this path to my PATH variable and then tried to run cmake again:</p>
  
  <p>C:>cd local\projects\synergy-usb\synergy-through-usb-master</p>
  
  <pre><code>C:\local\projects\synergy-usb\synergy-through-usb-master&gt;cmake .
  You have called ADD_LIBRARY for library cryptopp without any source files. This typically indicates a problem with your CMakeLists.txt file
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  LIBUSB_1_LIBRARY
      linked by target "arch" in directory C:/local/projects/synergy-usb/synergy-through-usb-master/src/lib/arch
  
  -- Configuring incomplete, errors occurred!
  See also "C:/local/projects/synergy-usb/synergy-through-usb-master/CMakeFiles/CMakeOutput.log".
  </code></pre>
  
  <p>Now I am stuck again. I have no idea what it wants me to do. It knows where libusb is...</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Here is the contects (part of) the CMakeLists.txt that has libusb in it:</p>
  
  <pre><code>find_package(libusb-1.0 REQUIRED)
  
  set(inc
      .
      ../base
      ../common
      ../mt
      ../platform
      ../synergy
      ${LIBUSB_1_INCLUDE_DIRS}
  )
  
  if (UNIX)
      list(APPEND inc
          ../../..
          ../arch
      )
  endif()
  
  include_directories(${inc})
  add_library(arch STATIC ${src})
  
  set(libs
      ../lib
      ${LIBUSB_1_LIBRARIES}
      )
  
  if (WIN32)
      if (GAME_DEVICE_SUPPORT)
          list(APPEND libs synxinhk)
      endif()
  endif()
  
  target_link_libraries(arch ${libs})
  </code></pre>
  
  <p><strong>Edit 2</strong></p>
  
  <p>I added the following lines into the findlibusb-1.0.cmake file:</p>
  
  <pre><code>set(LIBUSB_1_LIBRARY C:\\local\\libs\\libusbx\\libusb-1.0.dll)
  message(STATUS "***********************************&gt;   LIBUSB_1_LIBRARY: ${LIBUSB_1_LIBRARY}")
  </code></pre>
  
  <p>Here is the output from that:</p>
  
  <pre><code>C:\local\projects\synergy-usb\synergy-through-usb-master&gt;cmake .
  -- ***********************************&gt;   LIBUSB_1_LIBRARY: C:\local\libs\libusbx\libusb-1.0.dll
  -- Found libusb-1.0:
  --  - Includes: C:/local/libs/libusbx
  --  - Libraries: C:\local\libs\libusbx\libusb-1.0.dll
  You have called ADD_LIBRARY for library cryptopp without any source files. This typically indicates a problem with your CMakeLists.txt file
  -- Configuring done
  CMake Error: CMake can not determine linker language for target: cryptopp
  CMake Error: CMake can not determine linker language for target: cryptopp
  CMake Error: CMake can not determine linker language for target: cryptopp
  CMake Error: CMake can not determine linker language for target: cryptopp
  -- Generating done
  -- Build files have been written to: C:/local/projects/synergy-usb/synergy-through-usb-master
  </code></pre>
  
  <p>Still does not build, but this particular library seems to be added ok now :)</p>