mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
CMake: build-time test - backwards compatibility with older glibc (#1467)
This commit is contained in:
parent
fdab2586a5
commit
7c76322215
@ -139,6 +139,22 @@ if (ENABLE_DEV_USB_HID)
|
||||
else()
|
||||
target_link_libraries(leddevice ${LIBUSB_1_LIBRARIES} hidapi-libusb)
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
include(CheckCSourceCompiles)
|
||||
# Glibc compatibilty check
|
||||
check_c_source_compiles("
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
int main() {
|
||||
struct timespec t;
|
||||
return clock_gettime(CLOCK_REALTIME, &t);
|
||||
}
|
||||
" GLIBC_HAS_CLOCK_GETTIME)
|
||||
IF(NOT GLIBC_HAS_CLOCK_GETTIME)
|
||||
target_link_libraries(leddevice rt)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_MDNS)
|
||||
|
Loading…
Reference in New Issue
Block a user