2010-11-30 10:08:30 +00:00
|
|
|
include(FlightGearComponent)
|
|
|
|
|
|
|
|
set(EVENT_INPUT_SOURCES
|
|
|
|
FGLinuxEventInput.cxx
|
|
|
|
FGMacOSXEventInput.cxx
|
|
|
|
)
|
|
|
|
|
2011-01-14 21:30:51 +01:00
|
|
|
set (JS_INPUT_SOURCES
|
|
|
|
js.cxx
|
|
|
|
jsBSD.cxx
|
|
|
|
jsLinux.cxx
|
|
|
|
jsMacOSX.cxx
|
|
|
|
jsWindows.cxx
|
|
|
|
jsNone.cxx
|
|
|
|
)
|
|
|
|
|
2010-11-30 10:08:30 +00:00
|
|
|
set(SOURCES
|
|
|
|
FGButton.cxx
|
|
|
|
FGCommonInput.cxx
|
|
|
|
FGDeviceConfigurationMap.cxx
|
|
|
|
FGEventInput.cxx
|
|
|
|
FGJoystickInput.cxx
|
|
|
|
FGKeyboardInput.cxx
|
|
|
|
FGMouseInput.cxx
|
2011-01-14 21:30:51 +01:00
|
|
|
input.cxx
|
2010-11-30 10:08:30 +00:00
|
|
|
)
|
2011-01-14 21:30:51 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# we still have a dependency on ul from plib!
|
|
|
|
|
2010-11-30 10:08:30 +00:00
|
|
|
if(EVENT_INPUT)
|
|
|
|
list(APPEND SOURCES ${EVENT_INPUT_SOURCES})
|
2011-01-14 21:30:51 +01:00
|
|
|
else()
|
|
|
|
list(APPEND SOURCES ${JS_INPUT_SOURCES})
|
2010-11-30 10:08:30 +00:00
|
|
|
endif()
|
2011-01-14 21:30:51 +01:00
|
|
|
|
2010-11-30 10:08:30 +00:00
|
|
|
set(FGJS_SOURCES
|
|
|
|
fgjs.cxx
|
|
|
|
jsinput.cxx
|
|
|
|
jssuper.cxx
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(fgjs ${FGJS_SOURCES})
|
|
|
|
|
2010-12-27 12:44:17 +00:00
|
|
|
if(WIN32)
|
|
|
|
set(SOCKETS_LIBRARY wsock32.lib)
|
|
|
|
endif(WIN32)
|
|
|
|
|
2010-11-30 10:08:30 +00:00
|
|
|
target_link_libraries(fgjs
|
2011-01-14 21:30:51 +01:00
|
|
|
fgInput
|
2010-12-27 12:44:17 +00:00
|
|
|
${SOCKETS_LIBRARY}
|
2010-11-30 10:08:30 +00:00
|
|
|
${SIMGEAR_LIBRARIES}
|
|
|
|
${PLIB_LIBRARIES}
|
2011-01-14 21:30:51 +01:00
|
|
|
${JS_LIBS}
|
2010-11-30 10:08:30 +00:00
|
|
|
${ZLIB_LIBRARY})
|
|
|
|
|
2011-01-14 21:30:51 +01:00
|
|
|
add_executable(js_demo js_demo.cxx )
|
2010-11-30 10:08:30 +00:00
|
|
|
|
2011-01-14 21:30:51 +01:00
|
|
|
target_link_libraries(js_demo
|
|
|
|
fgInput
|
|
|
|
${JS_LIBS}
|
2010-11-30 10:08:30 +00:00
|
|
|
${PLIB_LIBRARIES}
|
2011-01-14 21:30:51 +01:00
|
|
|
)
|
2010-11-30 10:08:30 +00:00
|
|
|
|
|
|
|
flightgear_component(Input "${SOURCES}")
|
|
|
|
|
|
|
|
install(TARGETS fgjs js_demo RUNTIME DESTINATION bin)
|