Skip to content

Commit d35e5f8

Browse files
committed
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375486 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 5205202 commit d35e5f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/platforms/WinMsvc.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ else()
190190
endif()
191191

192192
set(MSVC_INCLUDE "${MSVC_BASE}/include")
193+
set(ATLMFC_INCLUDE "${MSVC_BASE}/atlmfc/include")
193194
set(MSVC_LIB "${MSVC_BASE}/lib")
195+
set(ATLMFC_LIB "${MSVC_BASE}/atlmfc/lib")
194196
set(WINSDK_INCLUDE "${WINSDK_BASE}/Include/${WINSDK_VER}")
195197
set(WINSDK_LIB "${WINSDK_BASE}/Lib/${WINSDK_VER}")
196198

@@ -246,6 +248,7 @@ set(COMPILE_FLAGS
246248
-D_CRT_SECURE_NO_WARNINGS
247249
--target=${TRIPLE_ARCH}-windows-msvc
248250
-fms-compatibility-version=19.11
251+
-imsvc "${ATLMFC_INCLUDE}"
249252
-imsvc "${MSVC_INCLUDE}"
250253
-imsvc "${WINSDK_INCLUDE}/ucrt"
251254
-imsvc "${WINSDK_INCLUDE}/shared"
@@ -282,6 +285,7 @@ set(LINK_FLAGS
282285
# Prevent CMake from attempting to invoke mt.exe. It only recognizes the slashed form and not the dashed form.
283286
/manifest:no
284287

288+
-libpath:"${ATLMFC_LIB}/${WINSDK_ARCH}"
285289
-libpath:"${MSVC_LIB}/${WINSDK_ARCH}"
286290
-libpath:"${WINSDK_LIB}/ucrt/${WINSDK_ARCH}"
287291
-libpath:"${WINSDK_LIB}/um/${WINSDK_ARCH}")

0 commit comments

Comments
 (0)