-
Notifications
You must be signed in to change notification settings - Fork 769
0.1 release build system restructuring #376
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
Conversation
Rebased to master. |
Sorry, merge conflict with the huge bunch of comments, should be mostly trivial to resolve. |
Rebased to master. Good for review again. Ensure the old generated |
Seems to work fine for me; can you update the build instructions in the |
I just removed Due to libusb 1.0.20 release (yesterday), there is probably some better way to handle libusb now and some changes about libusb are expected. So I refrained from adding libusb related changes to the docs. |
OK, that's a nice coincidence. I probably won't have a lot of time this week, did you happen to test with libusb-1.0.20 already? Would be great if we could ditch the whole build-this-exact-commit-yourself thing. |
Had a moment to test after all; v1.0.20 does seem to work on Intel USB3 controllers at least. NEC to be tested soon. |
But it's probably a good idea not to mix things up too much; let's merge this soon so we can get it tested and deal with libusb updates at the end. |
This goes after #391 bug fix. Not yet with 1.0.20. I will do it soon. But caution is needed. I found a regression in libusb pre-1.0.20 a while ago #212 (comment). I'll verify if this has been fixed. I plan to use QEMU with PCI passthrough to test it with Windows and Mac. I'm also busy recently so that still takes some time to set up. |
Rebased to master after 391. |
I tried to build this on a Windows 8.1 VM with vfio-pci passthrough of xhci controller. The code did build, but I could not run it because I could not install driver for "Xbox NUI Sensor (composite parent)". Zadig could only find 2 "NuiSensor Adapter" devices. |
Right now both shared and static libraries are built at once without options for configuration. Use CMake standard variable BUILD_SHARED_LIBS to control the build type. Reusing shared library objects for static one is a bad idea because -fPIC results in slower static code with more bloat. Thus the option to build both at once is not provided. Users are free to rebuild with -DBUILD_SHARED_LIBS=OFF. This implements requests in #292 and #263, but reverting #276.
Package distributors can use RPATH to specify local libusb.
User reported error with 2.18.12 in #363. It seems before 2.18.12.1 transitive dependencies are not correctly resolved.
It can be found in commit history.
Renaming only commit. Will not build.
example/protonect is no more.
Remove Protonect definitions from the main CMakeLists.txt to `examples` directory. Fix *.bin paths. A few line-end whitespace deletions.
Move generated config.h and resources.inc.h to build directory.
Several LIBFREENECT_API macros are removed from identifiers that are no longer public. Several headers are moved to internal directory and no longer exported. Build for Protonect out-of-tree with public API only. This provides a demo on how to use the public API. Protonect will be built by default in libfreenect2, controlled with BUILD_EXAMPLES.
I'd say that right now, as long as it builds, we're good to merge. |
0.1 release build system restructuring
This implements the source code and build system restructuring in #314 (rename examples/protonect to src), which is intended to the last major PR before 0.1 release. All issues for 0.1 (#233) except x/ztable hardcoding are resolved after this PR.
This PR is rebased on #368 (OpenGL fixes) and #364 (logging system). Commits from #368 and #364 are shown here, but this PR starts from
Use BUILD_SHARED_LIBS to control library type
. Commits from other PRs can be commented in their respective PRs.Use BUILD_SHARED_LIBS to control library type
implements static/shared build configuration, requested in separate between static and shared libs, make it configureable #292 and build static library libfreenect2.a as well #263, but reverting create static and shared library from same source build #276.Allow custom RPATH settings
deprecates libusb embedding Link local libusb statically on Linux/Mac #283. Package distributors are now able to specify the custom libusb path to use for libfreenect2.Raise CMake version requirement to 2.18.12.1
fixes a bug Installation Error in Ubuntu 14.04 #363There are some ABI changes. I try to minimize the exposed API before the release for forward compatibility. In the commit 2f186a5 "Separate public and internal API", several headers are moved to an internal header directory and are no longer installed (no change for internal code though). Protonect in the examples directory can be built with installed libfreenect2:
cd examples; cmake .. -Dfreenect2_DIR=/tmp/libfreenect2/lib/cmake/freenect2; make; ./Protonect
. This will validate the API usage by third-party. And in the commit "Use CMake to generateLIBFREENECT2_API
macro", symbols become hidden by default, except those explicitly marked withLIBFREENECT2_API
. Inspecting libfreenect2.so withnm -g --defined-only -C libfreenect2.so
should reveal only the necessary ones are exported.This has been tested on Ubuntu/Intel.
I will rebase the PR with updates in the repo.