Fixed checking for linux/input.h

This commit is contained in:
Sam Lantinga 2023-11-07 23:44:58 -08:00
parent fea2504a37
commit 415283ef38
1 changed files with 6 additions and 8 deletions

View File

@ -1479,14 +1479,12 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
if(UNIX)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/core/unix/*.c")
if (HAVE_LINUX_INPUT_H)
check_c_source_compiles("
#include <linux/input.h>
#ifndef EVIOCGNAME
#error EVIOCGNAME() ioctl not available
#endif
int main(int argc, char** argv) { return 0; }" HAVE_LINUX_INPUT_H)
endif()
check_c_source_compiles("
#include <linux/input.h>
#ifndef EVIOCGNAME
#error EVIOCGNAME() ioctl not available
#endif
int main(int argc, char** argv) { return 0; }" HAVE_LINUX_INPUT_H)
if(LINUX)
check_c_source_compiles("