| 1 |
add_library(inputcommon |
| 2 |
DynamicInputTextureManager.cpp |
| 3 |
DynamicInputTextureManager.h |
| 4 |
GCAdapter.cpp |
| 5 |
GCAdapter.h |
| 6 |
ImageOperations.cpp |
| 7 |
ImageOperations.h |
| 8 |
InputConfig.cpp |
| 9 |
InputConfig.h |
| 10 |
InputProfile.cpp |
| 11 |
InputProfile.h |
| 12 |
ControllerEmu/ControllerEmu.cpp |
| 13 |
ControllerEmu/ControllerEmu.h |
| 14 |
ControllerEmu/StickGate.cpp |
| 15 |
ControllerEmu/StickGate.h |
| 16 |
ControllerEmu/Control/Control.cpp |
| 17 |
ControllerEmu/Control/Control.h |
| 18 |
ControllerEmu/Control/Input.cpp |
| 19 |
ControllerEmu/Control/Input.h |
| 20 |
ControllerEmu/Control/Output.cpp |
| 21 |
ControllerEmu/Control/Output.h |
| 22 |
ControllerEmu/ControlGroup/AnalogStick.cpp |
| 23 |
ControllerEmu/ControlGroup/AnalogStick.h |
| 24 |
ControllerEmu/ControlGroup/Attachments.cpp |
| 25 |
ControllerEmu/ControlGroup/Attachments.h |
| 26 |
ControllerEmu/ControlGroup/Buttons.cpp |
| 27 |
ControllerEmu/ControlGroup/Buttons.h |
| 28 |
ControllerEmu/ControlGroup/ControlGroup.cpp |
| 29 |
ControllerEmu/ControlGroup/ControlGroup.h |
| 30 |
ControllerEmu/ControlGroup/Cursor.cpp |
| 31 |
ControllerEmu/ControlGroup/Cursor.h |
| 32 |
ControllerEmu/ControlGroup/Force.cpp |
| 33 |
ControllerEmu/ControlGroup/Force.h |
| 34 |
ControllerEmu/ControlGroup/IMUAccelerometer.cpp |
| 35 |
ControllerEmu/ControlGroup/IMUAccelerometer.h |
| 36 |
ControllerEmu/ControlGroup/IMUCursor.cpp |
| 37 |
ControllerEmu/ControlGroup/IMUCursor.h |
| 38 |
ControllerEmu/ControlGroup/IMUGyroscope.cpp |
| 39 |
ControllerEmu/ControlGroup/IMUGyroscope.h |
| 40 |
ControllerEmu/ControlGroup/IRPassthrough.cpp |
| 41 |
ControllerEmu/ControlGroup/IRPassthrough.h |
| 42 |
ControllerEmu/ControlGroup/MixedTriggers.cpp |
| 43 |
ControllerEmu/ControlGroup/MixedTriggers.h |
| 44 |
ControllerEmu/ControlGroup/ModifySettingsButton.cpp |
| 45 |
ControllerEmu/ControlGroup/ModifySettingsButton.h |
| 46 |
ControllerEmu/ControlGroup/Slider.cpp |
| 47 |
ControllerEmu/ControlGroup/Slider.h |
| 48 |
ControllerEmu/ControlGroup/Tilt.cpp |
| 49 |
ControllerEmu/ControlGroup/Tilt.h |
| 50 |
ControllerEmu/ControlGroup/Triggers.cpp |
| 51 |
ControllerEmu/ControlGroup/Triggers.h |
| 52 |
ControllerEmu/Setting/NumericSetting.cpp |
| 53 |
ControllerEmu/Setting/NumericSetting.h |
| 54 |
ControllerInterface/DualShockUDPClient/DualShockUDPClient.cpp |
| 55 |
ControllerInterface/DualShockUDPClient/DualShockUDPClient.h |
| 56 |
ControllerInterface/DualShockUDPClient/DualShockUDPProto.h |
| 57 |
ControllerInterface/ControllerInterface.cpp |
| 58 |
ControllerInterface/ControllerInterface.h |
| 59 |
ControllerInterface/CoreDevice.cpp |
| 60 |
ControllerInterface/CoreDevice.h |
| 61 |
ControllerInterface/InputBackend.cpp |
| 62 |
ControllerInterface/InputBackend.h |
| 63 |
ControllerInterface/MappingCommon.cpp |
| 64 |
ControllerInterface/MappingCommon.h |
| 65 |
ControllerInterface/Wiimote/WiimoteController.cpp |
| 66 |
ControllerInterface/Wiimote/WiimoteController.h |
| 67 |
ControlReference/ControlReference.cpp |
| 68 |
ControlReference/ControlReference.h |
| 69 |
ControlReference/ExpressionParser.cpp |
| 70 |
ControlReference/ExpressionParser.h |
| 71 |
ControlReference/FunctionExpression.cpp |
| 72 |
ControlReference/FunctionExpression.h |
| 73 |
DynamicInputTextures/DITConfiguration.cpp |
| 74 |
DynamicInputTextures/DITConfiguration.h |
| 75 |
DynamicInputTextures/DITData.h |
| 76 |
DynamicInputTextures/DITSpecification.cpp |
| 77 |
DynamicInputTextures/DITSpecification.h |
| 78 |
) |
| 79 |
|
| 80 |
target_link_libraries(inputcommon |
| 81 |
PUBLIC |
| 82 |
common |
| 83 |
|
| 84 |
PRIVATE |
| 85 |
fmt::fmt |
| 86 |
sfml-network |
| 87 |
spng::spng |
| 88 |
) |
| 89 |
|
| 90 |
if(WIN32) |
| 91 |
target_sources(inputcommon PRIVATE |
| 92 |
ControllerInterface/DInput/DInput.cpp |
| 93 |
ControllerInterface/DInput/DInput.h |
| 94 |
ControllerInterface/DInput/DInput8.h |
| 95 |
ControllerInterface/DInput/DInputJoystick.cpp |
| 96 |
ControllerInterface/DInput/DInputJoystick.h |
| 97 |
ControllerInterface/DInput/DInputKeyboardMouse.cpp |
| 98 |
ControllerInterface/DInput/DInputKeyboardMouse.h |
| 99 |
ControllerInterface/DInput/NamedKeys.h |
| 100 |
ControllerInterface/DInput/XInputFilter.cpp |
| 101 |
ControllerInterface/DInput/XInputFilter.h |
| 102 |
ControllerInterface/Win32/Win32.cpp |
| 103 |
ControllerInterface/Win32/Win32.h |
| 104 |
ControllerInterface/WGInput/WGInput.cpp |
| 105 |
ControllerInterface/WGInput/WGInput.h |
| 106 |
ControllerInterface/XInput/XInput.cpp |
| 107 |
ControllerInterface/XInput/XInput.h |
| 108 |
ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp |
| 109 |
ControllerInterface/ForceFeedback/ForceFeedbackDevice.h |
| 110 |
) |
| 111 |
elseif(APPLE) |
| 112 |
target_sources(inputcommon PRIVATE |
| 113 |
ControllerInterface/Quartz/Quartz.h |
| 114 |
ControllerInterface/Quartz/Quartz.mm |
| 115 |
ControllerInterface/Quartz/QuartzKeyboardAndMouse.h |
| 116 |
ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm |
| 117 |
) |
| 118 |
target_link_libraries(inputcommon PRIVATE |
| 119 |
${COREFOUNDATION_LIBRARY} |
| 120 |
${CARBON_LIBRARY} |
| 121 |
${COCOA_LIBRARY} |
| 122 |
${FORCEFEEDBACK_LIBRARY} |
| 123 |
) |
| 124 |
target_compile_options(inputcommon PRIVATE |
| 125 |
-fobjc-arc |
| 126 |
) |
| 127 |
elseif(X11_FOUND) |
| 128 |
target_include_directories(inputcommon PUBLIC ${X11_INPUT_INCLUDE_DIRS}) |
| 129 |
target_sources(inputcommon PRIVATE |
| 130 |
ControllerInterface/Xlib/XInput2.cpp |
| 131 |
ControllerInterface/Xlib/XInput2.h |
| 132 |
) |
| 133 |
target_link_libraries(inputcommon PRIVATE PkgConfig::X11_INPUT) |
| 134 |
elseif(ANDROID) |
| 135 |
target_compile_definitions(inputcommon PRIVATE -DCIFACE_USE_ANDROID) |
| 136 |
target_sources(inputcommon PRIVATE |
| 137 |
ControllerInterface/Android/Android.cpp |
| 138 |
ControllerInterface/Android/Android.h |
| 139 |
ControllerInterface/Touch/InputOverrider.cpp |
| 140 |
ControllerInterface/Touch/InputOverrider.h |
| 141 |
) |
| 142 |
target_link_libraries(inputcommon PRIVATE |
| 143 |
androidcommon |
| 144 |
) |
| 145 |
endif() |
| 146 |
|
| 147 |
if(NOT ANDROID) |
| 148 |
target_link_libraries(inputcommon PUBLIC LibUSB::LibUSB) |
| 149 |
endif() |
| 150 |
|
| 151 |
if(LIBEVDEV_FOUND AND LIBUDEV_FOUND) |
| 152 |
target_sources(inputcommon |
| 153 |
PRIVATE |
| 154 |
ControllerInterface/evdev/evdev.cpp |
| 155 |
ControllerInterface/evdev/evdev.h |
| 156 |
) |
| 157 |
target_include_directories(inputcommon |
| 158 |
PRIVATE |
| 159 |
${LIBEVDEV_INCLUDE_DIR} |
| 160 |
${LIBUDEV_INCLUDE_DIR} |
| 161 |
) |
| 162 |
target_link_libraries(inputcommon |
| 163 |
PRIVATE |
| 164 |
${LIBEVDEV_LIBRARY} |
| 165 |
${LIBUDEV_LIBRARY} |
| 166 |
) |
| 167 |
endif() |
| 168 |
|
| 169 |
if(UNIX) |
| 170 |
target_sources(inputcommon PRIVATE |
| 171 |
ControllerInterface/Pipes/Pipes.cpp |
| 172 |
ControllerInterface/Pipes/Pipes.h |
| 173 |
) |
| 174 |
endif() |
| 175 |
|
| 176 |
if(ENABLE_SDL) |
| 177 |
target_sources(inputcommon PRIVATE |
| 178 |
ControllerInterface/SDL/SDL.cpp |
| 179 |
ControllerInterface/SDL/SDL.h |
| 180 |
ControllerInterface/SDL/SDLGamepad.cpp |
| 181 |
ControllerInterface/SDL/SDLGamepad.h |
| 182 |
) |
| 183 |
target_link_libraries(inputcommon PRIVATE SDL3::SDL3) |
| 184 |
target_compile_definitions(inputcommon PUBLIC HAVE_SDL3=1) |
| 185 |
endif() |
| 186 |
|
| 187 |
if(MSVC) |
| 188 |
# Add precompiled header |
| 189 |
target_link_libraries(inputcommon PRIVATE use_pch) |
| 190 |
endif() |
| 191 |
|
| 192 |
if(TARGET Hidapi::Hidapi) |
| 193 |
target_sources(inputcommon |
| 194 |
PRIVATE |
| 195 |
ControllerInterface/SteamDeck/SteamDeck.cpp |
| 196 |
ControllerInterface/SteamDeck/SteamDeck.h |
| 197 |
) |
| 198 |
target_link_libraries(inputcommon PUBLIC Hidapi::Hidapi) |
| 199 |
target_compile_definitions(inputcommon PRIVATE -DHAVE_HIDAPI=1) |
| 200 |
endif() |