function(setup_api)
	if("${TARGET_API}" STREQUAL "OpenGl")
		set(TARGET_API_COMPILE_DEF "ERM_OPENGL" PARENT_SCOPE)
		find_package(OpenGL REQUIRED)
		set(TARGET_API_LIB "${OPENGL_gl_LIBRARY}" PARENT_SCOPE)
		set(ERM_RAY_TRACING_ENABLED OFF CACHE BOOL "" FORCE)
	elseif("${TARGET_API}" STREQUAL "Vulkan")
		set(TARGET_API "Vulkan" PARENT_SCOPE)
		set(TARGET_API_COMPILE_DEF "ERM_VULKAN" PARENT_SCOPE)
		find_package(Vulkan REQUIRED)
		set(TARGET_API_LIB "${Vulkan_LIBRARIES}" PARENT_SCOPE)
		set(TARGET_API_INCLUDE_DIR "${Vulkan_INCLUDE_DIR}" PARENT_SCOPE)
		set(GLFW_VULKAN_STATIC TRUE PARENT_SCOPE)
	elseif("${TARGET_API}" STREQUAL "DX12")
		set(TARGET_API "DX12" PARENT_SCOPE)
		set(TARGET_API_COMPILE_DEF "ERM_DX12" PARENT_SCOPE)
		set(ERM_RAY_TRACING_ENABLED OFF CACHE BOOL "" FORCE)
	else()
		message(FATAL_ERROR "Target API ${TARGET_API} not supported")
	endif()
endfunction()

option(ERM_FLIP_PROJECTION "If ON the projection matrix will be flipped over the Y axis" ON)
option(ERM_FLIP_VIEWPORT "If ON the viewport will be flipped over the Y axis" OFF)
option(ERM_ASSIMP_ENABLED "If ON assimp library will be used to load models" OFF)
option(ERM_RAY_TRACING_ENABLED "If ON it will try to enable ray tracing (if supported by the API" ON)
