CMakeLists.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # SPDX-FileCopyrightText: 2018 yuzu Emulator Project
  2. # SPDX-License-Identifier: GPL-2.0-or-later
  3. add_library(input_common STATIC
  4. drivers/camera.cpp
  5. drivers/camera.h
  6. drivers/gc_adapter.cpp
  7. drivers/gc_adapter.h
  8. drivers/keyboard.cpp
  9. drivers/keyboard.h
  10. drivers/mouse.cpp
  11. drivers/mouse.h
  12. drivers/sdl_driver.cpp
  13. drivers/sdl_driver.h
  14. drivers/tas_input.cpp
  15. drivers/tas_input.h
  16. drivers/touch_screen.cpp
  17. drivers/touch_screen.h
  18. drivers/udp_client.cpp
  19. drivers/udp_client.h
  20. drivers/virtual_amiibo.cpp
  21. drivers/virtual_amiibo.h
  22. helpers/stick_from_buttons.cpp
  23. helpers/stick_from_buttons.h
  24. helpers/touch_from_buttons.cpp
  25. helpers/touch_from_buttons.h
  26. helpers/udp_protocol.cpp
  27. helpers/udp_protocol.h
  28. input_engine.cpp
  29. input_engine.h
  30. input_mapping.cpp
  31. input_mapping.h
  32. input_poller.cpp
  33. input_poller.h
  34. main.cpp
  35. main.h
  36. )
  37. if (MSVC)
  38. target_compile_options(input_common PRIVATE
  39. /W4
  40. /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data
  41. /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
  42. /we4800 # Implicit conversion from 'type' to bool. Possible information loss
  43. )
  44. else()
  45. target_compile_options(input_common PRIVATE
  46. -Werror=conversion
  47. )
  48. endif()
  49. if (ENABLE_SDL2)
  50. target_sources(input_common PRIVATE
  51. drivers/sdl_driver.cpp
  52. drivers/sdl_driver.h
  53. )
  54. target_link_libraries(input_common PRIVATE SDL2)
  55. target_compile_definitions(input_common PRIVATE HAVE_SDL2)
  56. endif()
  57. target_link_libraries(input_common PRIVATE usb)
  58. create_target_directory_groups(input_common)
  59. target_link_libraries(input_common PUBLIC core PRIVATE common Boost::boost)