]> git.mxchange.org Git - flightgear.git/blob - src/Input/CMakeLists.txt
Merge branch 'next' into durk-atc
[flightgear.git] / src / Input / CMakeLists.txt
1 include(FlightGearComponent)
2
3 IF(APPLE)
4         set(EVENT_INPUT_SOURCES FGMacOSXEventInput.cxx)
5 else()
6         set(EVENT_INPUT_SOURCES FGLinuxEventInput.cxx)
7 endif()
8
9
10 set(SOURCES
11         FGButton.cxx
12         FGCommonInput.cxx
13         FGDeviceConfigurationMap.cxx
14         FGEventInput.cxx
15         FGJoystickInput.cxx
16         FGKeyboardInput.cxx
17         FGMouseInput.cxx
18         input.cxx       
19         )
20         
21 if(EVENT_INPUT)
22         list(APPEND SOURCES ${EVENT_INPUT_SOURCES})
23         include_directories(${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
24 endif()
25         
26 set(FGJS_SOURCES
27         fgjs.cxx
28         jsinput.cxx
29         jssuper.cxx
30         )
31         
32 add_executable(fgjs ${FGJS_SOURCES})
33
34 if(WIN32)
35    set(SOCKETS_LIBRARY wsock32.lib)
36 endif(WIN32)
37
38 target_link_libraries(fgjs 
39     ${SOCKETS_LIBRARY}
40         ${SIMGEAR_LIBRARIES}
41         ${PLIB_LIBRARIES}
42         ${ZLIB_LIBRARY})
43
44 add_executable(js_demo js_demo.cxx)
45
46 target_link_libraries(js_demo 
47         ${SIMGEAR_LIBRARIES}
48         ${PLIB_LIBRARIES}
49         ${ZLIB_LIBRARY})
50
51 flightgear_component(Input "${SOURCES}")
52
53 install(TARGETS fgjs js_demo RUNTIME DESTINATION bin)