-
Notifications
You must be signed in to change notification settings - Fork 769
Added FindLibrary files for various libraries #68
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
8ed37e5
to
ae8687a
Compare
ae8687a
to
595b402
Compare
Linux provides pkg_config scripts for libturbojpeg and for libusb, therefore i would like to not go for the cmake apporach to finding packages. I proposed in #90 another approach which uses pkg_config and keep the old system (for migration time) alive. |
I'm afraid that windows normally doesn't include pkg_config and seems quite a hassle to get it working, but the cmake script can be made to use pgk_config if on linux (also mac?) and then use the cmake module search on windows? |
Could do such a separation, but the main- dev's should decide in If your's got merged (or agreed), i agree to take care of the linux build... Best, On 18.11.2014 09:18, Lars wrote:
|
I think we all agree that we need a generic approach, especially now that all required libraries (except libusb) are available in distro repositories. However, I think this overlaps with PR #68 ? |
could we make our own FindTurboJPEG script in the cmake_modules folder, which on Linux/Mac basically uses pkg_config and on Windows uses a variable specifying the path? For libusb we have the issue that we need the patched version on Linux... |
Of course, I thought this is exactly what #68 proposes? |
Sorry, I confused the PRs... |
So to collect: Windows: Linux: General: If all agree: |
As for now, there is also a need for a patched libusb version on windows with this pr https://github.com/libusbx/libusbx/pull/164 , but that is up to the user to make sure that a proper libusb is installed. @goldhoorn : I just skimmed through the pr and I can see that I have hardcoded a path to turbojpeg, that should probably be changed. I'll try to look into it soon. |
@larshg: could you please contact me by email (see my profile) when you finished, you have not published you email, i don't want to flood this PR with discusson between us. |
589e1cc
to
5b3f117
Compare
bcd3daa
to
952ce87
Compare
952ce87
to
cac934c
Compare
Updated this a lot to work with recent master and making first use of PKG-config as requested by @goldhoorn. How are the various libraries located on Linux? |
(short answer) The core-concept: and so on.. But moreworese the distributions install in different sub-folder, thats what pkg-config was intended for. The user can give a multiple base-paths for package-config (.pc) files. The pc-file is generated during the build of these libraries and points to the correct paths. These paths are then used by cmake... |
6e6e074
to
59dc6e3
Compare
Hey @christiankerl Can you review it? There might be needed some paths updates in the Linux part, since I haven't yet installed a linux test machine. This is only if the libraries are not found by pkg-config though. edit: Just noticed that build was added to the ignore list - want it removed? Lars |
I successfully tested this PR on Ubuntu 14.04 and Debian testing with all dependancies installed externally (either by apt-get or by providing the related pkg-config files (which are part of the libs itself). Ack for merge from my side |
Sorry for the long silence, was just preparing to merge this, but has it been tested on MacOS X so far? |
I don't have a macos currently sorry :-( |
OSX errors:
libusb is installed, but macports does not provide a pkgconfig file for it.
Even when |
@xlz however it's simliar
|
@gaborpapp can you try set TurboJPEG_ROOT to the full path? That's what the root environment variables are for. @floe I only have a windows running atm. but I am semi working on getting a linux eviroment working also - but for now thats more @goldhoorn area in this pr. I'll add the depends/"libraries" paths to all the findLibrary cmake files soonish. |
I'm in standby for testing ping me, but not have (yet) the time to contribute actively. |
@larhsg |
@gaborpapp whats the subfolder in libjpeg_turbo? bin,classes,doc,include and lib? |
something like that, yes.
|
@gaborpapp I just relooked the find cmake script for libjpegturbo and it didn't look in the enviroment path variable for non-windows systems. I have added changes here https://github.com/larshg/libfreenect2/tree/FixFindLibJPEG - can you try it out? |
@larshg now it works for turbojpeg. thanks. would be nice to have a fallback location in the depends folder for the other libs as well if the |
I guess if you can set an environment variable that would be fine? We can also add the depend folder as a search path until/if the depends get removed at some time - what do you think @floe ? I'll look at the libusb also @gaborpapp - its also your local depends folder? - whats the folder structure for include and lib directory? |
Yes, I would suggest to simply put depends/libusb and depends/glfw into the search path for the time being. I think it will take a while until we can drop the dedicated libusb build. |
oki and the 3 libraries are expected to be placed in depends with these subfolders: libjpeg_turbo, libusb and glfw? I'll add those 3 paths in their respective findlib cmake files. |
yes, if it works with an environment variable, that is fine. Maybe a bit easier to work with if the folders are in the search path as @floe suggests.
maybe it is because the It is also in the depends folder, because I ran
|
Just to clarify, will it still work on Windows if I just rename LibUSB to LibUSB-1.0? |
if works if you also rename the cmake file for locating liusb. ie. findlibusb.cmake to findlibusb-1.0.cmake. |
Can you guys create a experimental branch on the repro so that we can On 04.06.2015 14:54, Lars wrote:
|
I've pushed a new branch |
The branch works fine on my setup. |
No i'm completely confused i don't have a kinect at my hand just now. Current chosen one (with patch): Previously choosen: These packages are a mess... |
With the current master or libusb branch I always get this error
sovled it by checking if defined The other problem is, that it now uses the system libusb, with is version 1.0.17. This version does not contain the needed patch. So there need to be a check for the version, for everything lower than 1.0.19-1 (or what ever is says on debian) use the one from the depends folder. |
Please check new branch |
Works fine here. |
@larshg good to know, thanks. |
@floe, if there's no working OSX build issues with the current master: I had to set
|
@gaborpapp The libusb install in |
@gaborpapp I have added include and lib to the search path for depends folder - can you try #260 ? Maybe the pkg-config sets another variable than LibUSB_INCLUDE_DIR - can you see what name it is @gaborpapp - then we can rename the scripts accordingly. It could be LibUSB_INCLUDE_DIRS? Edit: I can see that @goldhoorn has added a check on this exact variable with reference to buggy pkg-config file - but he only added for linux with this path: /usr/include/libusb-1.0 - so maybe we can add to the depends/libusb too. |
@larshg pkg_check_modules macro provides only <XPREFIX>_INCLUDE_DIRS. (Not _DIR but _DIRS.) |
@larshg grepping CMakeCache.txt for libusb gives these lines, which seem relevant. although this is still the libusb installed on the system instead of the one in depends.
|
@larshg Can you document your workflow? Even if I want to fix your cmake files and have a Windows machine to test, I still don't know what you intended for this kind of stuff here ("libusb-win32 is a port of the USB library libusb-0.1", we never used libusb-0.1), and I don't know how to avoid breaking your workflow. |
Instead of hard coding in a sub depend folder.
Updated to to use PKG-config first to find and fallback to Cmake if pkg-config is not found.
I have only tested it on windows.