jkuhlmann / gainput

Cross-platform C++ input library supporting gamepads, keyboard, mouse, touch
http://gainput.johanneskuhlmann.de/
MIT License
858 stars 104 forks source link

Library does not support Linux #80

Open vladislav-tkach opened 3 years ago

vladislav-tkach commented 3 years ago

The lib/CMakeLists.txt does not contain X11 linkage for Linux

if(WIN32)
    target_link_libraries(gainput ${XINPUT} ws2_32)
    target_link_libraries(gainputstatic ${XINPUT} ws2_32)
    add_definitions(-DGAINPUT_LIB_DYNAMIC=1)
elseif(ANDROID)
    target_link_libraries(gainputstatic native_app_glue log android)
    target_link_libraries(gainput native_app_glue log android)
elseif(APPLE)
    find_library(FOUNDATION Foundation)
    find_library(IOKIT IOKit)
  find_library(GAME_CONTROLLER GameController)
    target_link_libraries(gainput ${FOUNDATION} ${IOKIT} ${GAME_CONTROLLER})
  if(IOS)
      find_library(UIKIT UIKit)
      find_library(COREMOTION CoreMotion)
      find_library(QUARTZCORE QuartzCore)
      target_link_libraries(gainput ${UIKIT} ${COREMOTION})
  else()
      find_library(APPKIT AppKit)
      target_link_libraries(gainput ${APPKIT})
  endif()
endif()