# Add backends here
subdir('dx11')
subdir('vk')

renderer_link_libs = [runtime_lib]

if get_option('default_library') == 'static'
  if get_option('static_renderer') == 'vk'
    renderer_link_libs += vk_renderer_lib
  elif get_option('static_renderer') == 'dx11'
    renderer_link_libs += dx11_renderer_lib
  else
    error('Invalid static_renderer option ', get_option('static_renderer'))
  endif
endif


renderer_lib = library('renderer',
    'backend_api.h',
    'command_list.h',
    'renderer.h',
    'render_mesh.h',
    'render_resource.h',
    'virtual_resource_registry.h',

    'command_list.c',
    'init.c',
    'load_stub.c',
    'meshlet_pools.c',
    'render_mesh.c',
    'virtual_resource_registry.c',
	dependencies: [m_dep, thread_dep],
	link_with: renderer_link_libs,
	include_directories: engine_incdir,
	install: true)

