PROJECT(BALL_PLUGINS)

OPTION(USE_PRESENTABALL_PLUGIN "Build the PresentaBALL plugin" ON)
OPTION(USE_XML3D_PLUGIN "Build the XML3D plugin" ON)
OPTION(USE_SPACENAV_PLUGIN "Build the SpaceNavigator input device plugin" ON)
OPTION(USE_VRPN_PLUGIN "Build the VRPN input device plugin" ON)
OPTION(USE_VRPNHD_PLUGIN "Build the VRPNDH input device plugin" ON)
OPTION(USE_BALLAXY_PLUGIN "Build the BALLaxy widget plugin" ON)

IF (USE_PRESENTABALL_PLUGIN)
	ADD_SUBDIRECTORY(PRESENTABALL)
ENDIF()

IF (USE_SPACENAV_PLUGIN)
	ADD_SUBDIRECTORY(SPACENAV)
ENDIF()

IF (USE_XML3D_PLUGIN)
	ADD_SUBDIRECTORY(XML3D)
ENDIF()

IF (USE_VRPN_PLUGIN)
	ADD_SUBDIRECTORY(VRPN)
ENDIF()

IF (USE_VRPNHD_PLUGIN)
	ADD_SUBDIRECTORY(VRPNHD)
ENDIF()

IF (USE_BALLAXY_PLUGIN)
	ADD_SUBDIRECTORY(BALLAXY)
ENDIF()

PROJECT(BALL_PLUGINS)

OPTION(USE_PRESENTABALL_PLUGIN "Build the PresentaBALL plugin" ON)
OPTION(USE_XML3D_PLUGIN "Build the XML3D plugin" ON)
OPTION(USE_SPACENAV_PLUGIN "Build the SpaceNavigator input device plugin" ON)
OPTION(USE_VRPN_PLUGIN "Build the VRPN input device plugin" ON)
OPTION(USE_VRPNHD_PLUGIN "Build the VRPNDH input device plugin" ON)
OPTION(USE_BALLAXY_PLUGIN "Build the BALLaxy widget plugin" ON)

IF (USE_PRESENTABALL_PLUGIN)
	ADD_SUBDIRECTORY(PRESENTABALL)
ENDIF()

IF (USE_SPACENAV_PLUGIN)
	ADD_SUBDIRECTORY(SPACENAV)
ENDIF()

IF (USE_XML3D_PLUGIN)
	ADD_SUBDIRECTORY(XML3D)
ENDIF()

IF (USE_VRPN_PLUGIN)
	ADD_SUBDIRECTORY(VRPN)
ENDIF()

IF (USE_VRPNHD_PLUGIN)
	ADD_SUBDIRECTORY(VRPNHD)
ENDIF()

IF (BALL_BUILD_BALLAXY)
	IF (USE_BALLAXY_PLUGIN)
		ADD_SUBDIRECTORY(BALLAXY)
	ENDIF()
ENDIF()

Build BALLaxy plugin only if BALLaxy build is enabled
Build BALLaxy plugin only if BALLaxy build is enabled
