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
3 changed files with 2 additions and 8 deletions

View File

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

View File

@@ -190,13 +190,7 @@ endif()
if(WIN32) if(WIN32)
enable_language(RC) enable_language(RC)
target_sources(86Box PUBLIC ../win/86Box-qt.rc) target_sources(86Box PUBLIC ../win/86Box-qt.rc)
target_sources(plat PRIVATE win_dynld.c) target_sources(plat PRIVATE win_dynld.c win_joystick_rawinput.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_link_libraries(86Box hid) target_link_libraries(86Box hid)
# CMake 3.22 messed this up for clang/clang++ # 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) target_sources(plat PRIVATE win_opendir.c)
endif() endif()
option(DINPUT "Use DirectInput joystick backend instead of raw input" OFF)
if(DINPUT) if(DINPUT)
target_sources(plat PRIVATE win_joystick.cpp) target_sources(plat PRIVATE win_joystick.cpp)
target_link_libraries(86Box dinput8) target_link_libraries(86Box dinput8)