[CMake] [WinMsvc] Look for includes and libs in ${MSVC_BASE}/atlmfc

This is necessary if building with the DIA SDK enabled.

Differential Revision: https://reviews.llvm.org/D69240

llvm-svn: 375486
This commit is contained in:
Martin Storsjo 2019-10-22 06:36:27 +00:00
parent e659fff2fb
commit 3fe1c88bb2
1 changed files with 4 additions and 0 deletions

View File

@ -190,7 +190,9 @@ else()
endif() endif()
set(MSVC_INCLUDE "${MSVC_BASE}/include") set(MSVC_INCLUDE "${MSVC_BASE}/include")
set(ATLMFC_INCLUDE "${MSVC_BASE}/atlmfc/include")
set(MSVC_LIB "${MSVC_BASE}/lib") set(MSVC_LIB "${MSVC_BASE}/lib")
set(ATLMFC_LIB "${MSVC_BASE}/atlmfc/lib")
set(WINSDK_INCLUDE "${WINSDK_BASE}/Include/${WINSDK_VER}") set(WINSDK_INCLUDE "${WINSDK_BASE}/Include/${WINSDK_VER}")
set(WINSDK_LIB "${WINSDK_BASE}/Lib/${WINSDK_VER}") set(WINSDK_LIB "${WINSDK_BASE}/Lib/${WINSDK_VER}")
@ -246,6 +248,7 @@ set(COMPILE_FLAGS
-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS
--target=${TRIPLE_ARCH}-windows-msvc --target=${TRIPLE_ARCH}-windows-msvc
-fms-compatibility-version=19.11 -fms-compatibility-version=19.11
-imsvc "${ATLMFC_INCLUDE}"
-imsvc "${MSVC_INCLUDE}" -imsvc "${MSVC_INCLUDE}"
-imsvc "${WINSDK_INCLUDE}/ucrt" -imsvc "${WINSDK_INCLUDE}/ucrt"
-imsvc "${WINSDK_INCLUDE}/shared" -imsvc "${WINSDK_INCLUDE}/shared"
@ -282,6 +285,7 @@ set(LINK_FLAGS
# Prevent CMake from attempting to invoke mt.exe. It only recognizes the slashed form and not the dashed form. # Prevent CMake from attempting to invoke mt.exe. It only recognizes the slashed form and not the dashed form.
/manifest:no /manifest:no
-libpath:"${ATLMFC_LIB}/${WINSDK_ARCH}"
-libpath:"${MSVC_LIB}/${WINSDK_ARCH}" -libpath:"${MSVC_LIB}/${WINSDK_ARCH}"
-libpath:"${WINSDK_LIB}/ucrt/${WINSDK_ARCH}" -libpath:"${WINSDK_LIB}/ucrt/${WINSDK_ARCH}"
-libpath:"${WINSDK_LIB}/um/${WINSDK_ARCH}") -libpath:"${WINSDK_LIB}/um/${WINSDK_ARCH}")