# Allows LLVMDebugInfoPDB to import the DIA SDK as a library target.

if(NOT MSVC_DIA_SDK_DIR)
    set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK")
endif()

set(MSVC_DIA_SDK_LINK_DIR "${MSVC_DIA_SDK_DIR}\\lib")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
    set(MSVC_DIA_SDK_LINK_DIR "${MSVC_DIA_SDK_LINK_DIR}\\amd64")
endif()

include_directories("${MSVC_DIA_SDK_DIR}\\include")

add_library(MSVC_diaguids STATIC IMPORTED)
set_target_properties(MSVC_diaguids PROPERTIES
    IMPORTED_LOCATION "${MSVC_DIA_SDK_LINK_DIR}\\diaguids.lib"
)
