set(FOOBAR2000SDK_SEARCH_PATH "${FOOBAR2000SDK_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/ThirdParty/foobar2000")
set(WTL_SEARCH_PATH "${FOOBAR2000SDK_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/ThirdParty/wtl")
set(PFC_SEARCH_PATH "${FOOBAR2000SDK_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/ThirdParty/pfc")

find_path(FOOBAR2000SDK_ATLHELPERS_INCLUDE_DIR 
    NAMES ATLHelpers.h
    PATHS ${FOOBAR2000SDK_SEARCH_PATH}
    PATH_SUFFIXES ATLHelpers)

find_path(FOOBAR2000SDK_SDK_INCLUDE_DIR 
    NAMES foobar2000.h
    PATHS ${FOOBAR2000SDK_SEARCH_PATH}
    PATH_SUFFIXES SDK)

find_path(FOOBAR2000SDK_SHARED_LIBRARY_DIR 
    NAMES shared.lib
    PATHS ${FOOBAR2000SDK_SEARCH_PATH}
    PATH_SUFFIXES shared)

find_path(WTL_INCLUDE_DIR 
    NAMES atlapp.h
    PATHS ${WTL_SEARCH_PATH})

find_path(PFC_INCLUDE_DIR 
    NAMES pfc.h
    PATHS ${PFC_SEARCH_PATH})

set(FOOBAR2000SDK_INCLUDE_DIRS 
    ${FOOBAR2000SDK_ATLHELPERS_INCLUDE_DIR} 
    ${FOOBAR2000SDK_SDK_INCLUDE_DIR}
    ${WTL_INCLUDE_DIR}
    ${PFC_INCLUDE_DIR}
    )
set(FOOBAR2000SDK_LIBRARY_DIRS
    ${FOOBAR2000SDK_SHARED_LIBRARY_DIR})
set(FOOBAR2000SDK_LIBRARIES
    ${FOOBAR2000SDK_SHARED_LIBRARY_DIR}/shared.lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Foobar2000SDK DEFAULT_MSG
    FOOBAR2000SDK_INCLUDE_DIRS
    FOOBAR2000SDK_LIBRARY_DIRS
    FOOBAR2000SDK_LIBRARIES)