diff options
author | gregory guy <[email protected]> | 2021-05-12 20:17:47 +0200 |
---|---|---|
committer | gregory guy <[email protected]> | 2021-05-17 23:41:50 +0200 |
commit | 1389e296969df0acf7f393b698a3a0f1fb572026 (patch) | |
tree | c974f6bebc1aefcab0658a49a6edffbe67ee6e79 /ConfigureChecks.cmake | |
parent | f9381127bb9d913a1b8d525b3feb9e2956a54b84 (diff) | |
download | tdebase-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 <[email protected]>
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 21 |
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 ) |