Skip to content

Conversation

@goldhoorn
Copy link
Contributor

No description provided.

@xlz
Copy link
Member

xlz commented Jun 12, 2015

Looks fine. But synergy with #283 is also needed. If libfreenect2 includes libusb statically, it also needs to provide libusb's flags.

@goldhoorn
Copy link
Contributor Author

Leben husb is not part of freenect itself. Therefore the library which includes libusb does not neet to link gainst libusb

@floe floe added this to the 0.1 milestone Jun 14, 2015
@goldhoorn
Copy link
Contributor Author

ops cell-phone-auto-correction (prev post)

Why we should need to link against statically against libusb in a shared library?
I see no reason to do so. Furthermore this PR blocks the integration of the kinect into rock (see linked PR) and has no influence to others.

If another (higher-level) library needs libusb, he has to make sure that the correct libusb version is taken. For us we install libusb locally and the local folder is proffered in difference to the system one. So no problem at all. If you (or others) needs special behavior this is for me not part of the library itself.

You can still influence the build by passing CMAKE_CFLAGS to the build script externally.
#283 therefore is not related to this. And only a special usecase.

@xlz
Copy link
Member

xlz commented Jun 15, 2015

Justification for static linking libusb is from #281:

  • Distro packager wants to create a libfreenect2 package.
  • libfreenect2 has to carry a copy of libusb-1.0.so, because the patched libusb-1.0 is not released anywhere.
  • Carrying a duplicate of libusb-1.0.so in a package conflicts with the normal libusb-1.0 package.
  • Static linking can avoid a duplicate libusb-1.0.so in the user's system. It can also avoid the RPATH mess.

In order to implement static linking, the libraries that are linked by libusb (-ludev -pthread) have to be linked by libfreenect2 now.

@goldhoorn
Copy link
Contributor Author

However i don't want to use the static linked version of libfreenect, so this PR has no influence.
Is there a reason to not merge it right ahead?

@xlz
Copy link
Member

xlz commented Jun 16, 2015

Well, it is fine to merge. If you are not willing to provide such fix, we can fix it later.

@goldhoorn
Copy link
Contributor Author

For me the current solution is sufficient 👍 for merge

floe added a commit that referenced this pull request Jun 17, 2015
Added pkg-config file to support external library usages
@floe floe merged commit 49d4465 into OpenKinect:master Jun 17, 2015
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.

3 participants