if(WIN32)
	include (FindPackageHandleStandardArgs)
	
	set(PROGRAMFILES_X86 "$ENV{programfiles\(x86\)}")
	find_path(TEVIRTUALMIDISDK_DIR NAMES teVirtualMIDI.h
		HINTS "${PROGRAMFILES_X86}/Tobias Erichsen/teVirtualMIDISDK"
		PATH_SUFFIXES "C-Binding"
	)

	set(TEVIRTUALMIDISDK_INCLUDE_DIR ${TEVIRTUALMIDISDK_DIR} CACHE PATH "teVirtualMidiSDK include dir")
	message(STATUS ${TEVIRTUALMIDISDK_INCLUDE_DIRs})

	set(LIBRARY_NAMES "")
	if(64bit)
		list(APPEND LIBRARY_NAMES teVirtualMIDI64)
	else()
		list(APPEND LIBRARY_NAMES teVirtualMIDI32)
	endif()

	find_library(TEVIRTUALMIDISDK_LIBRARIES
		NAMES ${LIBRARY_NAMES}
		HINTS ${TEVIRTUALMIDISDK_DIR}
	)

	if(TEVIRTUALMIDISDK_INCLUDE_DIR AND TEVIRTUALMIDISDK_LIBRARIES)
		set(TEVIRTUALMIDISDK_FOUND ON)
	endif()

	# if(${TEVIRTUALMIDISDK})
	# 	file(READ "version.txt" ver)
	# endif()

	add_library(teVirtualMIDISDK::teVirtualMIDISDK SHARED IMPORTED)
	set_property(TARGET teVirtualMIDISDK::teVirtualMIDISDK PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TEVIRTUALMIDISDK_INCLUDE_DIR})
	set_property(TARGET teVirtualMIDISDK::teVirtualMIDISDK PROPERTY IMPORTED_IMPLIB ${TEVIRTUALMIDISDK_LIBRARIES})
endif()
