summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2021-05-12 20:17:47 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-05-18 02:12:37 +0200
commit9bdd3a0e4724a591f0cdc6dd8bdd60dc794354e4 (patch)
treee1f3c78fd2ad1f6186821bc2a97e765cc9012307 /ConfigureChecks.cmake
parent865e10771879338bfdab0f0a2adb387fd3c44b50 (diff)
downloadtdebase-9bdd3a0e4724a591f0cdc6dd8bdd60dc794354e4.tar.gz
tdebase-9bdd3a0e4724a591f0cdc6dd8bdd60dc794354e4.zip
Make the option -DWITH_USBIDS more visible for packagers.
Look for installed usb.ids file, if not found, default to the one provided in source. usb.ids file has been updated to Version 2021.03.31 Signed-off-by: gregory guy <gregory-tde@laposte.net> Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 1389e296969df0acf7f393b698a3a0f1fb572026)
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 88f11868d..070c32f02 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -24,6 +24,27 @@ find_package( TQt )
find_package( TDE )
+##### look for the usb.ids file, Its location can be set EG: -DWITH_USBIDS="/opt/share/misc/usb.ids"
+
+if( WITH_USBIDS )
+ set( USBIDS_FILE "${WITH_USBIDS}" )
+ message( STATUS "Using specified usb.ids file: ${USBIDS_FILE}" )
+ else()
+ find_file( PATH_USBIDS usb.ids
+ HINTS /usr/share/misc
+ /var/lib/usbutils
+ /usr/share/hwdata
+ )
+ if( PATH_USBIDS )
+ set( USBIDS_FILE "${PATH_USBIDS}" )
+ message( STATUS "Using system usb.ids file: ${PATH_USBIDS}" )
+ else()
+ set( USE_BUILTIN_USBIDS 1 )
+ message( STATUS "File usb.ids (hwdata) was not found on the system, using builtin" )
+ endif()
+endif( WITH_USBIDS )
+
+
##### check for libdl ###########################
set( DL_LIBRARIES dl )