-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for Mac OS X and Windows to presets for libfreenect2 (…
…issue bytedeco/javacv#837)
- Loading branch information
Showing
7 changed files
with
93 additions
and
65 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 |
---|---|---|
|
@@ -37,14 +37,14 @@ | |
* | ||
* @author Samuel Audet | ||
*/ | ||
@Properties(target="org.bytedeco.javacpp.dc1394", value={ | ||
@Platform(not="android", include={"<poll.h>", "<dc1394/dc1394.h>", "<dc1394/types.h>", "<dc1394/log.h>", | ||
@Properties(target = "org.bytedeco.javacpp.dc1394", value = { | ||
@Platform(not = "android", include = {"<poll.h>", "<dc1394/dc1394.h>", "<dc1394/types.h>", "<dc1394/log.h>", | ||
"<dc1394/camera.h>", "<dc1394/control.h>", "<dc1394/capture.h>", "<dc1394/conversions.h>", "<dc1394/format7.h>", | ||
"<dc1394/iso.h>", "<dc1394/register.h>", "<dc1394/video.h>", "<dc1394/utils.h>"}, link="[email protected]", | ||
preload="[email protected]", preloadpath="/usr/local/lib/"), | ||
@Platform(value="windows", include={"<dc1394/dc1394.h>", "<dc1394/types.h>", "<dc1394/log.h>", | ||
"<dc1394/iso.h>", "<dc1394/register.h>", "<dc1394/video.h>", "<dc1394/utils.h>"}, link = "[email protected]"), | ||
@Platform(value = "macosx", preload = "[email protected]", preloadpath = "/usr/local/lib/"), | ||
@Platform(value = "windows", include = {"<dc1394/dc1394.h>", "<dc1394/types.h>", "<dc1394/log.h>", | ||
"<dc1394/camera.h>", "<dc1394/control.h>", "<dc1394/capture.h>", "<dc1394/conversions.h>", "<dc1394/format7.h>", | ||
"<dc1394/iso.h>", "<dc1394/register.h>", "<dc1394/video.h>", "<dc1394/utils.h>"}, preload={"libdc1394-22", "libusb-1.0"}) }) | ||
"<dc1394/iso.h>", "<dc1394/register.h>", "<dc1394/video.h>", "<dc1394/utils.h>"}, preload = {"libdc1394-22", "libusb-1.0"}) }) | ||
public class dc1394 implements InfoMapper { | ||
public void map(InfoMap infoMap) { | ||
infoMap.put(new Info("poll.h").skip()) | ||
|
@@ -64,7 +64,7 @@ public void map(InfoMap infoMap) { | |
POLLHUP = 0x010, | ||
POLLNVAL = 0x020; | ||
|
||
@Platform(not="windows") public static class pollfd extends Pointer { | ||
@Platform(not = "windows") public static class pollfd extends Pointer { | ||
static { Loader.load(); } | ||
public pollfd() { allocate(); } | ||
public pollfd(long size) { allocateArray(size); } | ||
|
@@ -81,7 +81,7 @@ public void map(InfoMap infoMap) { | |
public native short revents(); public native pollfd revents(short fd); | ||
} | ||
|
||
@Platform(not="windows") public native static int poll(pollfd fds, @Cast("nfds_t") long nfds, int timeout); | ||
@Platform(not = "windows") public native static int poll(pollfd fds, @Cast("nfds_t") long nfds, int timeout); | ||
|
||
public static abstract class dc1394video_frame_t_abstract extends Pointer { | ||
public dc1394video_frame_t_abstract() { } | ||
|
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 was deleted.
Oops, something went wrong.
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,27 @@ | ||
diff -ruN libfreenect2-0.2.0/cmake_modules/FindGLFW3.cmake libfreenect2-0.2.0-patch/cmake_modules/FindGLFW3.cmake | ||
--- libfreenect2-0.2.0/cmake_modules/FindGLFW3.cmake 2016-04-28 05:34:51.000000000 +0900 | ||
+++ libfreenect2-0.2.0-patch/cmake_modules/FindGLFW3.cmake 2017-12-05 13:07:59.751981013 +0900 | ||
@@ -6,23 +6,6 @@ | ||
# GLFW3_INCLUDE_DIRS | ||
# GLFW3_LIBRARIES | ||
|
||
-IF(PKG_CONFIG_FOUND) | ||
- IF(APPLE) | ||
- # homebrew or macports pkgconfig locations | ||
- SET(ENV{PKG_CONFIG_PATH} "/usr/local/opt/glfw3/lib/pkgconfig:/opt/local/lib/pkgconfig") | ||
- ENDIF() | ||
- SET(ENV{PKG_CONFIG_PATH} "${DEPENDS_DIR}/glfw/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}") | ||
- PKG_CHECK_MODULES(GLFW3 glfw3) | ||
- | ||
- FIND_LIBRARY(GLFW3_LIBRARY | ||
- NAMES ${GLFW3_LIBRARIES} | ||
- HINTS ${GLFW3_LIBRARY_DIRS} | ||
- ) | ||
- SET(GLFW3_LIBRARIES ${GLFW3_LIBRARY}) | ||
- | ||
- RETURN() | ||
-ENDIF() | ||
- | ||
FIND_PATH(GLFW3_INCLUDE_DIRS | ||
GLFW/glfw3.h | ||
DOC "GLFW include directory " |
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 |
---|---|---|
|
@@ -32,10 +32,17 @@ | |
* @author Jeremy Laviole | ||
*/ | ||
@Properties(target = "org.bytedeco.javacpp.freenect2", value = { | ||
@Platform(value = "linux-x86", include = {"<libfreenect2/libfreenect2.hpp>", "<libfreenect2/frame_listener.hpp>", | ||
"<libfreenect2/frame_listener_impl.h>", "<libfreenect2/logger.h>", "<libfreenect2/packet_pipeline.h>", | ||
"<libfreenect2/registration.h>", "<libfreenect2/config.h>"}, | ||
link = "[email protected]", preload = "[email protected]") }) | ||
@Platform(value = {"linux-x86", "macosx-x86_64", "windows-x86_64"}, include = {"<libfreenect2/libfreenect2.hpp>", | ||
"<libfreenect2/frame_listener.hpp>", "<libfreenect2/frame_listener_impl.h>", "<libfreenect2/logger.h>", | ||
"<libfreenect2/packet_pipeline.h>", "<libfreenect2/registration.h>", "<libfreenect2/config.h>"}, | ||
link = "[email protected]"), | ||
@Platform(value = "macosx-x86_64", preload = "[email protected]", preloadpath = "/usr/local/lib/"), | ||
@Platform(value = "windows-x86_64", preload = {"freenect2-openni2", "glfw3", "libusb-1.0", "turbojpeg", "concrt140", "msvcp140", "vcruntime140", | ||
"api-ms-win-crt-locale-l1-1-0", "api-ms-win-crt-string-l1-1-0", "api-ms-win-crt-stdio-l1-1-0", "api-ms-win-crt-math-l1-1-0", | ||
"api-ms-win-crt-heap-l1-1-0", "api-ms-win-crt-runtime-l1-1-0", "api-ms-win-crt-convert-l1-1-0", "api-ms-win-crt-environment-l1-1-0", | ||
"api-ms-win-crt-time-l1-1-0", "api-ms-win-crt-filesystem-l1-1-0", "api-ms-win-crt-utility-l1-1-0", "api-ms-win-crt-multibyte-l1-1-0"}, | ||
preloadpath = {"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x64/Microsoft.VC140.CRT/", | ||
"C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x64/"}) }) | ||
public class freenect2 implements InfoMapper { | ||
public void map(InfoMap infoMap) { | ||
infoMap.put(new Info("LIBFREENECT2_WITH_CUDA_SUPPORT", "LIBFREENECT2_WITH_OPENCL_SUPPORT").define(false)) | ||
|