diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index 8156653647..a23b2ef07c 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -1352,12 +1352,13 @@ endmacro() macro(CheckLibUDev) if(SDL_LIBUDEV) - check_include_file("libudev.h" have_libudev_header) - if(have_libudev_header) + check_include_file("libudev.h" HAVE_LIBUDEV_HEADER) + if(HAVE_LIBUDEV_HEADER) set(HAVE_LIBUDEV_H TRUE) FindLibraryAndSONAME(udev) if(UDEV_LIB_SONAME) set(SDL_UDEV_DYNAMIC "\"${UDEV_LIB_SONAME}\"") + set(HAVE_LIBUDEV TRUE) endif() endif() endif()