diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index 49c536a07f..02dc4aca6f 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -423,7 +423,12 @@ wx_option(wxUSE_MOUSEWHEEL "use mousewheel") wx_option(wxUSE_VALIDATORS "use wxValidator and derived classes") wx_option(wxUSE_BUSYINFO "use wxBusyInfo") wx_option(wxUSE_HOTKEY "use wxWindow::RegisterHotKey()") -wx_option(wxUSE_JOYSTICK "use wxJoystick") +if(UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(wxUSE_JOYSTICK_DEFAULT OFF) +else() + set(wxUSE_JOYSTICK_DEFAULT ON) +endif() +wx_option(wxUSE_JOYSTICK "use wxJoystick" ${wxUSE_JOYSTICK_DEFAULT}) wx_option(wxUSE_METAFILE "use wxMetaFile") wx_option(wxUSE_DRAGIMAGE "use wxDragImage") wx_option(wxUSE_UIACTIONSIMULATOR "use wxUIActionSimulator (experimental)") diff --git a/build/cmake/setup.cmake b/build/cmake/setup.cmake index 2ecaed993e..365c1f3a62 100644 --- a/build/cmake/setup.cmake +++ b/build/cmake/setup.cmake @@ -445,7 +445,7 @@ if(UNIX) check_symbol_exists(inet_addr arpa/inet.h HAVE_INET_ADDR) endif(wxUSE_SOCKETS) - if(WXGTK AND NOT APPLE) + if(wxUSE_JOYSTICK AND NOT APPLE) check_include_files("linux/joystick.h" HAVE_JOYSTICK_H) if(NOT HAVE_JOYSTICK_H) message(WARNING "wxJoystick is not available")