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

Using XWiimote deprecated function #138

Closed
jgvictores opened this issue Nov 20, 2017 · 7 comments
Closed

Using XWiimote deprecated function #138

jgvictores opened this issue Nov 20, 2017 · 7 comments
Assignees

Comments

@jgvictores
Copy link
Member

To solve #134, 6735632 was introduced.

  1. If we continue with old distros (see Try hc-driver-4.9 on TEO teo-main#26 and related), see if we can catch xwii version via preprocessor and #ifdefaccordingly.
  2. If we move on to newer distros on all systems, move on to newer function again.
@PeterBowman
Copy link
Member

PeterBowman commented Nov 20, 2017

I could either parse the version string from /usr/lib/x86_64-linux-gnu/pkgconfig/libxwiimote.pc (not the best idea if the location/format of this file differs from one architecture/OS to another) or start playing with try_run().

Edit: or improve FindXWiimote.cmake so that a XWIIMOTE_VERSION is set, then either restrict building this component from v2 onwards only or support v0.3 (with the old xwii_iface_poll) via preprocessor definition.

@jgvictores
Copy link
Member Author

In addition to priority: low, added blocked by roboticslab-uc3m/teo-main#26 label. BTW, could add interesting label too. 😄

@PeterBowman
Copy link
Member

I actually gave a try to the pkg-config solution mixed with find modules and seems promising, expect updates soon.

not the best idea if the location/format of this file differs from one architecture/OS to another

This is not a big deal: .pc files should land in some standard location and CMake takes care of the rest with pkg_check_modules().

@PeterBowman
Copy link
Member

Should be fine at 0eb18f3, closing as done. I'll write down this page here as it explains quite a few useful things about find modules:

https://cmake.org/Wiki/CMake:How_To_Find_Libraries

@jgvictores
Copy link
Member Author

Should be fine at 0eb18f3, closing as done. I'll write down this page here as it explains quite a few useful things about find modules:

https://cmake.org/Wiki/CMake:How_To_Find_Libraries

Cool commit!

Also added the ref to the cmake wiki at https://github.com/asrob-uc3m/tutoriales/blob/master/software/programming/cmake.md

@PeterBowman PeterBowman changed the title Using xwii depreciated function Using XWiimote deprecated function Dec 31, 2017
@PeterBowman
Copy link
Member

PeterBowman commented Dec 31, 2017

Another (and up-to-date) ref on writing nice find modules:

https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#a-sample-find-module

And how FindXWiimote.cmake looks now: link.

BTW The Difference Between Deprecated, Depreciated and Obsolete (SO).

@jgvictores
Copy link
Member Author

Another (and up-to-date) ref on writing nice find modules:

https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#a-sample-find-module

Thanks! Updated here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants