#!/usr/bin/env python
from waflib.extras import autowaf as autowaf

def build(bld):
	# Headers
	bld.install_files('${INCLUDEDIR}/ingen/client', bld.path.ant_glob('*.hpp'))

	obj = bld(features = 'cxx cxxshlib')
	obj.source = '''
		ClientStore.cpp
		NodeModel.cpp
		ObjectModel.cpp
		PatchModel.cpp
		PluginModel.cpp
		PluginUI.cpp
		PortModel.cpp
		ThreadedSigClientInterface.cpp
		ingen_client.cpp
	'''

	if bld.is_defined('HAVE_SOUP'):
		obj.source += '''
			HTTPClientReceiver.cpp
			HTTPEngineSender.cpp
		'''

	if bld.is_defined('HAVE_LIBLO'):
		obj.source += '''
			OSCClientReceiver.cpp
			OSCEngineSender.cpp
		'''

	obj.includes        = ['.', '..', '../..', '../../include']
	obj.export_includes = ['.']
	obj.name            = 'libingen_client'
	obj.target          = 'ingen_client'
	obj.install_path    = '${LIBDIR}'
	obj.use             = 'libingen_shared'
	autowaf.use_lib(bld, obj, 'GLIBMM LV2CORE SLV2 RAUL SORD SOUP SIGCPP LIBLO SOUP')