Skip to content

Commit

Permalink
* Update presets for Visual Studio 2015 (issue #298)
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Apr 8, 2017
1 parent 8c248d3 commit 7dfdee3
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Update presets for Visual Studio 2015 ([issue #298](https://github.com/bytedeco/javacpp-presets/issues/298))
* Reuse the presets for HDF5 with Caffe
* Replace the `exec-maven-plugin` with the `javacpp` plugin itself to execute the `cppbuild.sh` script files
* Link TensorFlow statically with `cudart` to avoid dependency on CUDA ([issue #396](https://github.com/bytedeco/javacpp-presets/issues/396))
Expand Down
2 changes: 2 additions & 0 deletions flandmark/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ case $PLATFORM in
cp libflandmark/*.a ../lib
;;
windows-x86)
patch -Np1 < ../../../flandmark-$FLANDMARK_VERSION-windows.patch
"$CMAKE" -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$OPENCV_PATH
nmake flandmark_static
cp libflandmark/*.h ../include
cp libflandmark/*.lib ../lib
;;
windows-x86_64)
patch -Np1 < ../../../flandmark-$FLANDMARK_VERSION-windows.patch
"$CMAKE" -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DOpenCV_DIR=$OPENCV_PATH
nmake flandmark_static
cp libflandmark/*.h ../include
Expand Down
23 changes: 23 additions & 0 deletions flandmark/flandmark-master-windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff -ruN flandmark-master/libflandmark/msvc-compat.h flandmark-master-windows/libflandmark/msvc-compat.h
--- flandmark-master/libflandmark/msvc-compat.h 2016-06-08 03:04:49.000000000 +0900
+++ flandmark-master-windows/libflandmark/msvc-compat.h 2017-04-08 22:21:01.187633700 +0900
@@ -1,18 +1 @@
-#ifndef FLANDMAR_MSVC_COMPAT
-#define FLANDMAR_MSVC_COMPAT
-#ifdef _MSC_VER
-
-typedef unsigned char uint8_t;
-typedef char int8_t;
-typedef unsigned __int16 uint16_t;
-typedef __int16 int16_t;
-typedef unsigned __int32 uint32_t;
-typedef __int32 int32_t;
-typedef unsigned __int64 uint64_t;
-typedef __int64 int64_t;
-
-#else
-# include <stdint.h>
-#endif
-
-#endif
+#include <stdint.h>
22 changes: 12 additions & 10 deletions libfreenect/libfreenect-0.5.3-windows.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
diff -ruN libfreenect-0.5.3/CMakeLists.txt libfreenect-0.5.3-windows/CMakeLists.txt
--- libfreenect-0.5.3/CMakeLists.txt 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/CMakeLists.txt 2015-10-23 23:43:47.350418200 +0900
@@ -127,7 +127,9 @@
+++ libfreenect-0.5.3-windows/CMakeLists.txt 2017-04-08 22:50:11.511319600 +0900
@@ -127,7 +127,11 @@

if(WIN32)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/platform/windows")
-endif()
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/platform/windows/libusb10emu")
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/platform/windows/libusb10emu/libusb-1.0")
+endif(WIN32)
+
+add_definitions(-D_TIMESPEC_DEFINED)

# Add library project
add_subdirectory (src)
diff -ruN libfreenect-0.5.3/platform/windows/unistd.h libfreenect-0.5.3-windows/platform/windows/unistd.h
--- libfreenect-0.5.3/platform/windows/unistd.h 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/platform/windows/unistd.h 2015-10-23 23:43:47.350418200 +0900
+++ libfreenect-0.5.3-windows/platform/windows/unistd.h 2017-04-08 22:47:57.144922000 +0900
@@ -37,15 +37,3 @@
typedef long ssize_t;
#endif // _SSIZE_T_DEFINED
Expand All @@ -33,7 +35,7 @@ diff -ruN libfreenect-0.5.3/platform/windows/unistd.h libfreenect-0.5.3-windows/
-}
diff -ruN libfreenect-0.5.3/src/cameras.c libfreenect-0.5.3-windows/src/cameras.c
--- libfreenect-0.5.3/src/cameras.c 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/src/cameras.c 2015-10-23 23:43:47.350418200 +0900
+++ libfreenect-0.5.3-windows/src/cameras.c 2017-04-08 22:47:57.176175300 +0900
@@ -868,12 +868,7 @@
return -1;
}
Expand Down Expand Up @@ -64,7 +66,7 @@ diff -ruN libfreenect-0.5.3/src/cameras.c libfreenect-0.5.3-windows/src/cameras.

diff -ruN libfreenect-0.5.3/src/CMakeLists.txt libfreenect-0.5.3-windows/src/CMakeLists.txt
--- libfreenect-0.5.3/src/CMakeLists.txt 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/src/CMakeLists.txt 2015-10-23 23:43:47.350418200 +0900
+++ libfreenect-0.5.3-windows/src/CMakeLists.txt 2017-04-08 22:47:57.191800600 +0900
@@ -5,21 +5,10 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${LIBUSB_1_INCLUDE_DIRS})
Expand Down Expand Up @@ -118,7 +120,7 @@ diff -ruN libfreenect-0.5.3/src/CMakeLists.txt libfreenect-0.5.3-windows/src/CMa
install (FILES "../include/libfreenect.h" "../include/libfreenect_registration.h" "../include/libfreenect_audio.h"
diff -ruN libfreenect-0.5.3/src/core.c libfreenect-0.5.3-windows/src/core.c
--- libfreenect-0.5.3/src/core.c 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/src/core.c 2015-10-23 23:43:47.350418200 +0900
+++ libfreenect-0.5.3-windows/src/core.c 2017-04-08 22:47:57.191800600 +0900
@@ -89,11 +89,6 @@
freenect_stop_video(dev);
freenect_stop_depth(dev);
Expand All @@ -133,7 +135,7 @@ diff -ruN libfreenect-0.5.3/src/core.c libfreenect-0.5.3-windows/src/core.c
return res;
diff -ruN libfreenect-0.5.3/src/flags.c libfreenect-0.5.3-windows/src/flags.c
--- libfreenect-0.5.3/src/flags.c 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/src/flags.c 2015-10-23 23:43:47.381690900 +0900
+++ libfreenect-0.5.3-windows/src/flags.c 2017-04-08 22:47:57.207426300 +0900
@@ -60,7 +60,7 @@
int ret = write_register(dev, 0x0015, 0x0007);
if (ret < 0)
Expand All @@ -154,7 +156,7 @@ diff -ruN libfreenect-0.5.3/src/flags.c libfreenect-0.5.3-windows/src/flags.c
}
diff -ruN libfreenect-0.5.3/src/usb_libusb10.c libfreenect-0.5.3-windows/src/usb_libusb10.c
--- libfreenect-0.5.3/src/usb_libusb10.c 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/src/usb_libusb10.c 2015-10-23 23:54:59.112117100 +0900
+++ libfreenect-0.5.3-windows/src/usb_libusb10.c 2017-04-08 22:47:57.223049700 +0900
@@ -68,42 +68,6 @@

FN_INTERNAL libusb_device * fnusb_find_connected_audio_device(libusb_device * camera, libusb_device ** deviceList, int cnt)
Expand Down Expand Up @@ -453,7 +455,7 @@ diff -ruN libfreenect-0.5.3/src/usb_libusb10.c libfreenect-0.5.3-windows/src/usb
}
diff -ruN libfreenect-0.5.3/src/usb_libusb10.h libfreenect-0.5.3-windows/src/usb_libusb10.h
--- libfreenect-0.5.3/src/usb_libusb10.h 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/src/usb_libusb10.h 2015-10-23 23:43:47.397295700 +0900
+++ libfreenect-0.5.3-windows/src/usb_libusb10.h 2017-04-08 22:47:57.301180300 +0900
@@ -87,7 +87,6 @@

int fnusb_start_iso(fnusb_dev *dev, fnusb_isoc_stream *strm, fnusb_iso_cb cb, unsigned char endpoint, int xfers, int pkts, int len);
Expand All @@ -464,7 +466,7 @@ diff -ruN libfreenect-0.5.3/src/usb_libusb10.h libfreenect-0.5.3-windows/src/usb
int fnusb_bulk(fnusb_dev *dev, uint8_t endpoint, uint8_t *data, int len, int *transferred);
diff -ruN libfreenect-0.5.3/wrappers/c_sync/CMakeLists.txt libfreenect-0.5.3-windows/wrappers/c_sync/CMakeLists.txt
--- libfreenect-0.5.3/wrappers/c_sync/CMakeLists.txt 2015-10-19 03:58:07.000000000 +0900
+++ libfreenect-0.5.3-windows/wrappers/c_sync/CMakeLists.txt 2015-10-23 23:43:47.397295700 +0900
+++ libfreenect-0.5.3-windows/wrappers/c_sync/CMakeLists.txt 2017-04-08 22:47:57.316806500 +0900
@@ -1,24 +1,28 @@
######################################################################################
# C Synchronous Interface
Expand Down
12 changes: 6 additions & 6 deletions opencv/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@ case $PLATFORM in
windows-x86)
BUILD_X="-DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_JASPER=ON -DBUILD_JPEG=ON -DBUILD_WEBP=ON -DBUILD_OPENEXR=ON -DBUILD_PNG=ON -DBUILD_TIFF=ON -DBUILD_ZLIB=ON -DBUILD_opencv_java=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_hdf=OFF"
WITH_X="-DWITH_1394=OFF -DWITH_FFMPEG=OFF -DWITH_GSTREAMER=OFF -DWITH_OPENMP=OFF -DWITH_CUDA=OFF -DWITH_OPENCL=OFF -DWITH_IPP=OFF"
"$CMAKE" -G "Visual Studio 12 2013" -DCMAKE_INSTALL_PREFIX=.. $BUILD_X -DENABLE_PRECOMPILED_HEADERS=ON $WITH_X $BUILD_CONTRIB_X -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-$OPENCV_VERSION/modules
"$CMAKE" -G "Visual Studio 14 2015" -DCMAKE_INSTALL_PREFIX=.. $BUILD_X -DENABLE_PRECOMPILED_HEADERS=ON $WITH_X $BUILD_CONTRIB_X -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-$OPENCV_VERSION/modules
MSBuild.exe INSTALL.vcxproj //p:Configuration=Release
cp -r ../x86/vc12/lib ..
cp -r ../x86/vc12/bin ..
cp -r ../x86/vc14/lib ..
cp -r ../x86/vc14/bin ..
;;
windows-x86_64)
BUILD_X="-DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_JASPER=ON -DBUILD_JPEG=ON -DBUILD_WEBP=ON -DBUILD_OPENEXR=ON -DBUILD_PNG=ON -DBUILD_TIFF=ON -DBUILD_ZLIB=ON -DBUILD_opencv_java=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_hdf=OFF"
WITH_X="-DWITH_1394=OFF -DWITH_FFMPEG=OFF -DWITH_GSTREAMER=OFF -DWITH_OPENMP=OFF -DWITH_CUDA=OFF -DWITH_OPENCL=OFF -DWITH_IPP=OFF"
"$CMAKE" -G "Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=.. $BUILD_X -DENABLE_PRECOMPILED_HEADERS=ON $WITH_X $BUILD_CONTRIB_X -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-$OPENCV_VERSION/modules
"$CMAKE" -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=.. $BUILD_X -DENABLE_PRECOMPILED_HEADERS=ON $WITH_X $BUILD_CONTRIB_X -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-$OPENCV_VERSION/modules
MSBuild.exe INSTALL.vcxproj //p:Configuration=Release
cp -r ../x64/vc12/lib ..
cp -r ../x64/vc12/bin ..
cp -r ../x64/vc14/lib ..
cp -r ../x64/vc14/bin ..
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
Expand Down
4 changes: 2 additions & 2 deletions videoinput/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
<artifactId>javacpp</artifactId>
<configuration>
<environmentVariables>
<!-- Hack required for Windows SDK v7.1 -->
<CL>&quot;/I${env.SDKDIR}/Include/&quot; &quot;/IC:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include&quot;</CL>
<!-- Hack required for the Windows SDK -->
<CL>&quot;/I${env.WINDOWSSDKDIR}/Include/&quot; &quot;/I${env.SDKDIR}/Include/&quot; &quot;/IC:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include&quot;</CL>
</environmentVariables>
</configuration>
<executions>
Expand Down

0 comments on commit 7dfdee3

Please sign in to comment.