Re: Review Request 110271: libusb-1 support in kcmusb (kinfocenter)
--- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/110271/#review32376 --- There is a Find-module for libusb in extra-cmake-modules. As long as this is not released yet, please use a copy from the one over there: http://quickgit.kde.org/?p=extra-cmake-modules.gita=blobh=eba47115f94cc2eb969f19166d6664b300864a30hb=316c7756ec1b0745f518d2f9af139812c3c5a24ff=find-modules%2FFindLibUSB1.cmake - Alexander Neundorf On May 11, 2013, 9:14 p.m., Max Brazhnikov wrote: --- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/110271/ --- (Updated May 11, 2013, 9:14 p.m.) Review request for kde-workspace. Description --- Use libusb-1 to query info about usb devices in kinfocenter. Remove *BSD specific code: it doesn't work on all supported FreeBSD versions. In principle it can be saved for NetBSD, but NetBSD could use libusb-1, thus drop it for simplification. Remove polling and use DeviceNotifier instead. Add FindLibUSB-1.cmake Diffs - cmake/modules/FindLibUSB-1.cmake PRE-CREATION kinfocenter/Modules/usbview/CMakeLists.txt 87bb256 kinfocenter/Modules/usbview/config-kcmusb.h.cmake PRE-CREATION kinfocenter/Modules/usbview/kcmusb.cpp c598467 kinfocenter/Modules/usbview/usbdevices.h 493caeb kinfocenter/Modules/usbview/usbdevices.cpp 9bd7033 Diff: http://git.reviewboard.kde.org/r/110271/diff/ Testing --- I've tested it only on FreeBSD. It would nice to test at least FindLibUSB-1.cmake on other OSes. Thanks, Max Brazhnikov
Re: Review Request 110271: libusb-1 support in kcmusb (kinfocenter)
On May 12, 2013, 9:21 a.m., Alexander Neundorf wrote: There is a Find-module for libusb in extra-cmake-modules. As long as this is not released yet, please use a copy from the one over there: http://quickgit.kde.org/?p=extra-cmake-modules.gita=blobh=eba47115f94cc2eb969f19166d6664b300864a30hb=316c7756ec1b0745f518d2f9af139812c3c5a24ff=find-modules%2FFindLibUSB1.cmake Thanks! but I need small modification, because on FreeBSD libusb1 has no '-1' suffix: http://people.freebsd.org/~makc/patches/FindLibUSB1.cmake Shall I open new request for extra-cmake-modules? Max - Max --- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/110271/#review32376 --- On May 11, 2013, 9:14 p.m., Max Brazhnikov wrote: --- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/110271/ --- (Updated May 11, 2013, 9:14 p.m.) Review request for kde-workspace. Description --- Use libusb-1 to query info about usb devices in kinfocenter. Remove *BSD specific code: it doesn't work on all supported FreeBSD versions. In principle it can be saved for NetBSD, but NetBSD could use libusb-1, thus drop it for simplification. Remove polling and use DeviceNotifier instead. Add FindLibUSB-1.cmake Diffs - cmake/modules/FindLibUSB-1.cmake PRE-CREATION kinfocenter/Modules/usbview/CMakeLists.txt 87bb256 kinfocenter/Modules/usbview/config-kcmusb.h.cmake PRE-CREATION kinfocenter/Modules/usbview/kcmusb.cpp c598467 kinfocenter/Modules/usbview/usbdevices.h 493caeb kinfocenter/Modules/usbview/usbdevices.cpp 9bd7033 Diff: http://git.reviewboard.kde.org/r/110271/diff/ Testing --- I've tested it only on FreeBSD. It would nice to test at least FindLibUSB-1.cmake on other OSes. Thanks, Max Brazhnikov
Re: Review Request 110271: libusb-1 support in kcmusb (kinfocenter)
On Sunday 12 May 2013, Max Brazhnikov wrote: On May 12, 2013, 9:21 a.m., Alexander Neundorf wrote: There is a Find-module for libusb in extra-cmake-modules. As long as this is not released yet, please use a copy from the one over there: http://quickgit.kde.org/?p=extra-cmake-modules.gita=blobh=eba47115f9 4cc2eb969f19166d6664b300864a30hb=316c7756ec1b0745f518d2f9af139812c3c5a 24ff=find-modules%2FFindLibUSB1.cmake Thanks! but I need small modification, because on FreeBSD libusb1 has no '-1' suffix: http://people.freebsd.org/~makc/patches/FindLibUSB1.cmake Shall I open new request for extra-cmake-modules? Yes, please. Or, if all you need is an additional name for the find_library() call, you can also go ahead and commit it. Alex
Re: Review Request 110271: libusb-1 support in kcmusb (kinfocenter)
--- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/110271/ --- (Updated May 11, 2013, 9:14 p.m.) Review request for kde-workspace. Changes --- Update FindLibUSB-1.cmake Description --- Use libusb-1 to query info about usb devices in kinfocenter. Remove *BSD specific code: it doesn't work on all supported FreeBSD versions. In principle it can be saved for NetBSD, but NetBSD could use libusb-1, thus drop it for simplification. Remove polling and use DeviceNotifier instead. Add FindLibUSB-1.cmake Diffs (updated) - cmake/modules/FindLibUSB-1.cmake PRE-CREATION kinfocenter/Modules/usbview/CMakeLists.txt 87bb256 kinfocenter/Modules/usbview/config-kcmusb.h.cmake PRE-CREATION kinfocenter/Modules/usbview/kcmusb.cpp c598467 kinfocenter/Modules/usbview/usbdevices.h 493caeb kinfocenter/Modules/usbview/usbdevices.cpp 9bd7033 Diff: http://git.reviewboard.kde.org/r/110271/diff/ Testing --- I've tested it only on FreeBSD. It would nice to test at least FindLibUSB-1.cmake on other OSes. Thanks, Max Brazhnikov
Re: Review Request 110271: libusb-1 support in kcmusb (kinfocenter)
Am 02.05.2013 15:49, schrieb Max Brazhnikov: Use libusb-1 to query info about usb devices in kinfocenter. Remove *BSD specific code: it doesn't work on all supported FreeBSD versions. In principle it can be saved for NetBSD, but NetBSD could use libusb-1, thus drop it for simplification. Remove polling and use DeviceNotifier instead. Add FindLibUSB-1.cmake First, the pkg-config stuff can be used on Windows. If the stuff isn't there it will simply do nothing, but it could. ok, I'll fix it. Then, find_library should never write it's stuff to a *_LIBRARIES variable as it will always only find one lib. The libraries variable should be composed from the libs found before and should not be a cached variable. ok. Finally, if the .pc provides a version you should use the newer interface of FPHSA that also allows version selection. Shouldn't cmake stuff work without pkg-config? Another problem is that FreeBSD has it's own implementation of libusb, which claims v1.0 api and there's no way to determine the version analogous to libusb.org version. Eike Max
Review Request 110271: libusb-1 support in kcmusb (kinfocenter)
--- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/110271/ --- Review request for kde-workspace. Description --- Use libusb-1 to query info about usb devices in kinfocenter. Remove *BSD specific code: it doesn't work on all supported FreeBSD versions. In principle it can be saved for NetBSD, but NetBSD could use libusb-1, thus drop it for simplification. Remove polling and use DeviceNotifier instead. Add FindLibUSB-1.cmake Diffs - cmake/modules/FindLibUSB-1.cmake PRE-CREATION kinfocenter/Modules/usbview/CMakeLists.txt 87bb256 kinfocenter/Modules/usbview/config-kcmusb.h.cmake PRE-CREATION kinfocenter/Modules/usbview/kcmusb.cpp c598467 kinfocenter/Modules/usbview/usbdevices.h 493caeb kinfocenter/Modules/usbview/usbdevices.cpp 9bd7033 Diff: http://git.reviewboard.kde.org/r/110271/diff/ Testing --- I've tested it only on FreeBSD. It would nice to test at least FindLibUSB-1.cmake on other OSes. Thanks, Max Brazhnikov
Re: Review Request 110271: libusb-1 support in kcmusb (kinfocenter)
Am 02.05.2013 15:49, schrieb Max Brazhnikov: Use libusb-1 to query info about usb devices in kinfocenter. Remove *BSD specific code: it doesn't work on all supported FreeBSD versions. In principle it can be saved for NetBSD, but NetBSD could use libusb-1, thus drop it for simplification. Remove polling and use DeviceNotifier instead. Add FindLibUSB-1.cmake First, the pkg-config stuff can be used on Windows. If the stuff isn't there it will simply do nothing, but it could. Then, find_library should never write it's stuff to a *_LIBRARIES variable as it will always only find one lib. The libraries variable should be composed from the libs found before and should not be a cached variable. Finally, if the .pc provides a version you should use the newer interface of FPHSA that also allows version selection. Eike