option (INVRS_ENABLE_JOYSTICKSERVER "Enable the SDL-based Joystick input server." ON) if ( NOT INVRS_ENABLE_JOYSTICKSERVER ) return() endif ( NOT INVRS_ENABLE_JOYSTICKSERVER ) set (TARGET_BIN_DIR ${INVRS_TARGET_BIN_DIR}) set (TARGET_DOC_DIR ${INVRS_TARGET_DOC_DIR}) # Store all source-files in the JOYSTICKSERVER_SRCS variable set(JOYSTICKSERVER_SRCS JoystickServer.cpp JoystickStateBlockDistributer.cpp) FIND_PACKAGE(SDL) if (NOT SDL_FOUND) message(FATAL, "Unable to find SDL!") endif (NOT SDL_FOUND) include_directories(${SDL_INCLUDE_DIR}) # build executables for JoystickServer add_executable (JoystickServer ${JOYSTICKSERVER_SRCS}) add_dependencies (JoystickServer inVRsSystemCore irrXML) target_link_libraries (JoystickServer inVRsSystemCore irrXML ${SDL_LIBRARY}) if (WIN32) target_link_libraries(JoystickServer debug OSGBaseD.lib debug OSGSystemD.lib debug OSGWindowGLUTD.lib optimized OSGBase.lib optimized OSGSystem.lib optimized OSGWindowGLUT.lib) endif (WIN32) install (TARGETS JoystickServer DESTINATION ${TARGET_BIN_DIR}) install (DIRECTORY config DESTINATION ${TARGET_DOC_DIR}/JoystickServer PATTERN ".svn" EXCLUDE )