]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/CMakeLists.txt
Use new SGBucket API in tile-manager
[flightgear.git] / src / Input / CMakeLists.txt
index 1f8458fa2734e9d94f143ff42de41813afd2abe8..11b277ef2fb2777511a3684aee4c8dfbe6424be0 100644 (file)
@@ -1,18 +1,15 @@
 include(FlightGearComponent)
 
-set(EVENT_INPUT_SOURCES
-       FGLinuxEventInput.cxx
-       FGMacOSXEventInput.cxx
-       )
+IF(APPLE)
+       set(EVENT_INPUT_SOURCES FGMacOSXEventInput.cxx)
+       set(EVENT_INPUT_HEADERS FGMacOSXEventInput.hxx)
+elseif(MSVC)
+       message(STATUS "EventInput not implemented for Windows yet")
+else()
+       set(EVENT_INPUT_SOURCES FGLinuxEventInput.cxx)
+       set(EVENT_INPUT_HEADERS FGLinuxEventInput.hxx)
+endif()
 
-set (JS_INPUT_SOURCES
-       js.cxx
-       jsBSD.cxx
-       jsLinux.cxx
-       jsMacOSX.cxx
-       jsWindows.cxx
-       jsNone.cxx
-       )
 
 set(SOURCES
        FGButton.cxx
@@ -25,43 +22,49 @@ set(SOURCES
        input.cxx
        )
 
-#
-# we still have a dependency on ul from plib!
+set(HEADERS
+       FGButton.hxx
+       FGCommonInput.hxx
+       FGDeviceConfigurationMap.hxx
+       FGEventInput.hxx
+       FGJoystickInput.hxx
+       FGKeyboardInput.hxx
+       FGMouseInput.hxx
+       input.hxx
+       )
 
 if(EVENT_INPUT)
        list(APPEND SOURCES ${EVENT_INPUT_SOURCES})
-else()
-       list(APPEND SOURCES ${JS_INPUT_SOURCES})
+       list(APPEND SOURCES ${EVENT_INPUT_HEADERS})
+       include_directories(${UDEV_INCLUDE_DIR})
 endif()
 
-set(FGJS_SOURCES
-       fgjs.cxx
-       jsinput.cxx
-       jssuper.cxx
-       )
-       
-add_executable(fgjs ${FGJS_SOURCES})
+if(ENABLE_FGJS)
+    set(FGJS_SOURCES
+        fgjs.cxx
+        jsinput.cxx
+        jssuper.cxx
+    )
 
-if(WIN32)
-   set(SOCKETS_LIBRARY wsock32.lib)
-endif(WIN32)
+    add_executable(fgjs ${FGJS_SOURCES})
+    target_link_libraries(fgjs
+        ${SIMGEAR_CORE_LIBRARIES}
+        ${PLIB_LIBRARIES}
+        ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
+    )
 
-target_link_libraries(fgjs 
-    fgInput
-    ${SOCKETS_LIBRARY}
-       ${SIMGEAR_LIBRARIES}
-       ${PLIB_LIBRARIES}
-       ${JS_LIBS}
-       ${ZLIB_LIBRARY})
+    install(TARGETS fgjs RUNTIME DESTINATION bin)
+endif()
 
-add_executable(js_demo js_demo.cxx )
+if(ENABLE_JS_DEMO)
+    add_executable(js_demo js_demo.cxx)
+    target_link_libraries(js_demo
+        ${SIMGEAR_CORE_LIBRARIES}
+        ${PLIB_LIBRARIES}
+        ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
+    )
 
-target_link_libraries(js_demo
-       fgInput
-       ${JS_LIBS}
-       ${PLIB_LIBRARIES}
-       )
-
-flightgear_component(Input "${SOURCES}")
+    install(TARGETS js_demo RUNTIME DESTINATION bin)
+endif()
 
-install(TARGETS fgjs js_demo RUNTIME DESTINATION bin)
+flightgear_component(Input "${SOURCES}" "${HEADERS}")
\ No newline at end of file