-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #387 from ChristophGr/master
allow to cross-compile 32 and 64 bit versions of the library for windows
- Loading branch information
Showing
4 changed files
with
75 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
PROJECT_DIR=$(readlink -e $(dirname $0)) | ||
cd "$PROJECT_DIR" | ||
|
||
WITH_USB=1 | ||
|
||
LIBUSB_WIN32_BIN_VERSION="1.2.6.0" | ||
LIBUSB_WIN32_BIN_ARCHIVE="libusb-win32-bin-$LIBUSB_WIN32_BIN_VERSION.zip" | ||
LIBUSB_WIN32_BIN_URL="http:https://freefr.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/$LIBUSB_WIN32_BIN_VERSION/$LIBUSB_WIN32_BIN_ARCHIVE" | ||
LIBUSB_WIN32_BIN_DIR="libusb-win32-bin-$LIBUSB_WIN32_BIN_VERSION" | ||
|
||
if [ "$WITH_USB" = "1" ]; then | ||
if [ ! -d $LIBUSB_WIN32_BIN_DIR ]; then | ||
wget -c $LIBUSB_WIN32_BIN_URL | ||
unzip $LIBUSB_WIN32_BIN_ARCHIVE | ||
fi | ||
fi | ||
|
||
|
||
rm -rf build | ||
mkdir build | ||
cd build | ||
|
||
|
||
case $1 in | ||
32*) | ||
mingw32-cmake .. -DLIBUSB_INCLUDE_DIRS="$PROJECT_DIR"/libusb-win32-bin-1.2.6.0/include -DLIBUSB_LIBRARIES="$PROJECT_DIR"/libusb-win32-bin-1.2.6.0/bin/x86/libusb0_x86.dll -DLIBNFC_ROOT_DIR=$PWD/.. -DLIBNFC_SYSCONFDIR='C:\\Program Files (x86)\\libnfc\\config' | ||
mingw32-make;; | ||
64*) | ||
mingw64-cmake .. -DLIBUSB_INCLUDE_DIRS="$PROJECT_DIR"/libusb-win32-bin-1.2.6.0/include -DLIBUSB_LIBRARIES="$PROJECT_DIR"/libusb-win32-bin-1.2.6.0/bin/amd64/libusb0.dll -DLIBNFC_ROOT_DIR=.. -DLIBNFC_SYSCONFDIR='C:\\Program Files\\libnfc\\config' | ||
mingw64-make;; | ||
*) | ||
echo "specify whether to build 32-bit or 64-bit version by supplying 32 or 64 as parameter";; | ||
esac |
This file was deleted.
Oops, something went wrong.