]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/CMakeLists.txt
Olaf Flebbe: incorporate plib js code to fix problems with MS joysticks under Vista...
[flightgear.git] / src / Input / CMakeLists.txt
index e0d6abd30ca1065516d7ad69bec3f301bab9c545..1f8458fa2734e9d94f143ff42de41813afd2abe8 100644 (file)
@@ -5,6 +5,15 @@ set(EVENT_INPUT_SOURCES
        FGMacOSXEventInput.cxx
        )
 
+set (JS_INPUT_SOURCES
+       js.cxx
+       jsBSD.cxx
+       jsLinux.cxx
+       jsMacOSX.cxx
+       jsWindows.cxx
+       jsNone.cxx
+       )
+
 set(SOURCES
        FGButton.cxx
        FGCommonInput.cxx
@@ -13,13 +22,18 @@ set(SOURCES
        FGJoystickInput.cxx
        FGKeyboardInput.cxx
        FGMouseInput.cxx
-       input.cxx       
+       input.cxx
        )
-       
+
+#
+# we still have a dependency on ul from plib!
+
 if(EVENT_INPUT)
        list(APPEND SOURCES ${EVENT_INPUT_SOURCES})
+else()
+       list(APPEND SOURCES ${JS_INPUT_SOURCES})
 endif()
-       
+
 set(FGJS_SOURCES
        fgjs.cxx
        jsinput.cxx
@@ -33,17 +47,20 @@ if(WIN32)
 endif(WIN32)
 
 target_link_libraries(fgjs 
+    fgInput
     ${SOCKETS_LIBRARY}
        ${SIMGEAR_LIBRARIES}
        ${PLIB_LIBRARIES}
+       ${JS_LIBS}
        ${ZLIB_LIBRARY})
 
-add_executable(js_demo js_demo.cxx)
+add_executable(js_demo js_demo.cxx )
 
-target_link_libraries(js_demo 
-       ${SIMGEAR_LIBRARIES}
+target_link_libraries(js_demo
+       fgInput
+       ${JS_LIBS}
        ${PLIB_LIBRARIES}
-       ${ZLIB_LIBRARY})
+       )
 
 flightgear_component(Input "${SOURCES}")