diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index ee8421fe1..6c33c2569 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -1088,7 +1088,7 @@ macro(CheckHIDAPI) set(HAVE_SDL_JOYSTICK TRUE) file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c) set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES}) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} \"-I${SDL2_SOURCE_DIR}/src/hidapi/hidapi\"") if(NOT HIDAPI_SKIP_LIBUSB) if(HIDAPI_ONLY_LIBUSB) set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)