cmake: allow to use pkg-config for windows builds as well
authorPaul Fertser <fercerpav@gmail.com>
Wed, 7 Aug 2013 10:35:47 +0000 (14:35 +0400)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 9 Aug 2013 15:09:15 +0000 (17:09 +0200)
commit300a9ed7f4d18fa710f748fd6f6fad35e72e2740
tree1e9a9aa7c6b4f8537c7e44f6ca55fd275ab9cb2e
parentca7d32448041e33bdb206241f210ad8961f8d10c
cmake: allow to use pkg-config for windows builds as well

If the user has an appropriate pkg-config wrapper,
e.g. i686-w64-mingw32-pkg-config (or building natively on mingw and
has pkg-config or pkg-config-lite installed), it can be used to locate
libusb-1.0 properly. For cross-compiling
-DPKG_CONFIG_EXECUTABLE=`which i686-w64-mingw32-pkg-config`
needs to be explicitly set.

It still doesn't prevent pkg-config-less operation, i.e. the user can
specify something like
-DLIBUSB_INCLUDE_DIR=~/i686-w64-mingw32-root/usr/include/libusb-1.0
and the build will succeed even when no pkg-config executable is
present.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
cmake/FindUSB1.cmake