find_path(FTD3XX_INCLUDE_DIR
	NAMES ftd3xx.h FTD3XX.h
)

find_library(FTD3XX_LIBRARY
	NAMES libftd3xx.a libftd3xx-static.a FTD3XX.lib
	PATH_SUFFIXES x64/Static
)

mark_as_advanced(FTD3XX_FOUND FTD3XX_INCLUDE_DIR FTD3XX_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FTD3XX
	REQUIRED_VARS FTD3XX_INCLUDE_DIR FTD3XX_LIBRARY
)
if(FTD3XX_FOUND AND NOT TARGET D3XX::D3XX)
	add_library(FTD3XX::FTD3XX INTERFACE IMPORTED)
	set_target_properties(FTD3XX::FTD3XX PROPERTIES
		INTERFACE_INCLUDE_DIRECTORIES "${FTD3XX_INCLUDE_DIR}"
		INTERFACE_LINK_LIBRARIES "${FTD3XX_LIBRARY}"
	)
endif()
