Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted fixes and cleanup for 0.1 #429

Merged
merged 16 commits into from Nov 6, 2015
Merged

Assorted fixes and cleanup for 0.1 #429

merged 16 commits into from Nov 6, 2015

Conversation

xlz
Copy link
Member

@xlz xlz commented Oct 16, 2015

Build tested on Debian (gcc 5, cmake 3.3, Intel), Ubuntu (gcc 4.8, cmake 2.8.12, Intel), Windows 7 (VS2013, Intel), WIndows 8.1 (VS2015, Intel), Ubuntu (gcc 4.8, cmake 2.8.12, ARM).

I think the commits are all quite small but functional.

@xlz
Copy link
Member Author

xlz commented Oct 16, 2015

Tests OK on all of Debian (gcc 5, cmake 3.3, Intel), Ubuntu (gcc 4.8, cmake 2.8.12, Intel), Windows 7 (VS2013, Intel), WIndows 8.1 (VS2015, Intel), Ubuntu (gcc 4.8, cmake 2.8.12, ARM).

@fran6co Could you test this on a Mac? Thanks.

@fran6co
Copy link
Contributor

fran6co commented Oct 16, 2015

I'll have to test it on Monday, I don't have a Kinect2 right now.

@xlz
Copy link
Member Author

xlz commented Oct 16, 2015

Reviews for this PR:

@christiankerl This PR changes glBindFramebuffer(GL_DRAW_FRAMEBUFFER,...) to GL_FRAMEBUFFER to fix one of FBO completeness requirements which is enforced only on OpenGL 3.1 not later. See if this looks OK.

@wiedemeyer This PR adds a local copy of cl.hpp to the repo and no longer downloads it. This will probably solve the once ugly undef CL_VERSION_1_2 hack. See if this practice is OK.

@larshg @HenningJ This PR improves Visual Studio support. It should automatically copy DLLs for both debugging and installation. Is this feature that you wanted? Also, now that I have a Windows machine for Kinect, I can fix more issues related to Visual Studio.

@fran6co
Copy link
Contributor

fran6co commented Oct 16, 2015

It builds ok, I'll give it a run on Monday.

@xlz
Copy link
Member Author

xlz commented Oct 16, 2015

@fran6co Thanks. Especially the OpenGL part which still has error reports recently.

@fran6co
Copy link
Contributor

fran6co commented Oct 19, 2015

Tested the OpenGL depth processor and it's working ok on OS X 10.11.

@xlz
Copy link
Member Author

xlz commented Oct 19, 2015

So now the testing coverage if full.

Is it time to drop support for Ubuntu 12.04 precise (cmake 2.8.7, no libusb 1.0.20, no beignet-dev 1.0) and document that?

@floe
Copy link
Contributor

floe commented Oct 20, 2015

Yes, I think 12.04 can be considered outdated now.

@floe floe added this to the 0.1 milestone Oct 20, 2015
@floe
Copy link
Contributor

floe commented Oct 22, 2015

Will test soon, however, merge conflict with #379?

xlz added 13 commits October 22, 2015 05:22
Rename it from "libfreenect2/libfreenect2_export.h" to
<libfreenect2/export.h>.
According to CMake docs, "link_directories() is rarely necessary".
Therefore remove link_directories(), and use find_library()
after pkg_check_modules() to obtain full paths of libraries.

Because of policy change of CMP0063, only set visibility properties
for freenect2. Do not make them global.
Add VS 2015 detection.

Add scripts for building libusb with VS2013/2015 (in a Git Shell).

Check MS64/dll paths for libusb, following the official binary
release file structure.
check_c_source_compiles would generate wrong files if the user
does not set correct variables initially even given correct values
later. Protect against this scenario.

This should fix #418.

Also remove "-MT" flags for MSVC which seems to do no good here.
Avoid flooding of packet loss messages on Windows because the
console is very slow.

Fix packet loss counting.
EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH are deprecated
by CMake. Use proper variables and also set up output path
for DLLs.
Properly check version and report error in the viewer.

In OpenGL processor, FBOs must have read buffer properly set up.

It's possible viewer's shader version 330 needs to be ported to
version 140, but no bugs were encountered at the moment.
Tell users at configure time libusb 1.0.19 does not work.

But do not enforce this on Windows or Mac OSX.
opencl-headers of Debian stretch+ and Ubuntu wily+ no longer carry
cl.hpp. Mac OSX Xcode also does not have cl.hpp.

Use a local copy to avoid asking users to download cl.hpp which
requires root to install and may break API beyond control of
libfreenect2.

This updated local copy will also solve compiling errors
"_mm_mfence not declared" in #139 and #250.
Add a copy FindOpenCL.cmake from CMake 3.1.0 verbatim except the
CMake BSD license header, and a path edit.

Check if libOpenCL.so is compatible with CL/cl.h. If not, issue
 a warning, and revert to OpenCL 1.1 for the processor. Otherwise
use OpenCL 1.2.

This should provide a proper solution to the issue in #167.
Mac OSX users should use package managers to install libusb
and glfw3. cl.hpp no longer needs downloading.

Fix install_ubuntu.sh to download debs properly for ARM users.
@xlz
Copy link
Member Author

xlz commented Oct 22, 2015

Conflict in CMakeLists.txt. Rebased.

Previously the logging level was reversed for adding a None level,
but the selection of cerr or cout was not reversed. Fix that.
@xlz
Copy link
Member Author

xlz commented Oct 26, 2015

I changed README "libusbK driver" section to remind Windows users not to make mistakes installing the driver. Resolves #448 #425.

floe added a commit that referenced this pull request Nov 6, 2015
Assorted fixes and cleanup for 0.1
@floe floe merged commit 3e3800e into OpenKinect:master Nov 6, 2015
@floe
Copy link
Contributor

floe commented Nov 6, 2015

@xlz thanks again for your work! I'll now close the related issues.

@lishirui
Copy link

lishirui commented Nov 6, 2015

Thanks @xlz , @floe and everyone who contribute this code and fix bugs

@xlz xlz deleted the build-cleanup branch November 18, 2015 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants