CMake: Move DirectInput backend option to Win32 UI

This commit is contained in:
Alexander Babikov 2024-03-07 18:20:55 +05:00
parent 3e6b4aa9e1
commit 2e10c5a870
No known key found for this signature in database
GPG key ID: 1FD93764F31AAF86
3 changed files with 2 additions and 8 deletions

View file

@ -131,7 +131,6 @@ option(RTMIDI "RtMidi"
option(FLUIDSYNTH "FluidSynth" ON)
option(MUNT "MUNT" ON)
option(VNC "VNC renderer" OFF)
option(DINPUT "DirectInput" OFF)
option(CPPTHREADS "C++11 threads" ON)
option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF)
option(MINITRACE "Enable Chrome tracing using the modified minitrace library" OFF)

View file

@ -190,13 +190,7 @@ endif()
if(WIN32)
enable_language(RC)
target_sources(86Box PUBLIC ../win/86Box-qt.rc)
target_sources(plat PRIVATE win_dynld.c)
if(DINPUT)
target_sources(plat PRIVATE win_joystick.cpp)
target_link_libraries(86Box dinput8)
else()
target_sources(plat PRIVATE win_joystick_rawinput.c)
endif()
target_sources(plat PRIVATE win_dynld.c win_joystick_rawinput.c)
target_link_libraries(86Box hid)
# CMake 3.22 messed this up for clang/clang++

View file

@ -51,6 +51,7 @@ if(NOT MINGW)
target_sources(plat PRIVATE win_opendir.c)
endif()
option(DINPUT "Use DirectInput joystick backend instead of raw input" OFF)
if(DINPUT)
target_sources(plat PRIVATE win_joystick.cpp)
target_link_libraries(86Box dinput8)