summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2021-05-12 20:17:47 +0200
committergregory guy <gregory-tde@laposte.net>2021-05-17 23:41:50 +0200
commit1389e296969df0acf7f393b698a3a0f1fb572026 (patch)
treec974f6bebc1aefcab0658a49a6edffbe67ee6e79 /ConfigureChecks.cmake
parentf9381127bb9d913a1b8d525b3feb9e2956a54b84 (diff)
downloadtdebase-1389e296969df0acf7f393b698a3a0f1fb572026.tar.gz
tdebase-1389e296969df0acf7f393b698a3a0f1fb572026.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>
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 1119661d5..7a698f144 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 )