49f828cf200839159a458b463d4aa7ab6686b122
[oota-llvm.git] / tools / llvm-pdbdump / CMakeLists.txt
1 set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK")\r
2 \r
3 # Due to a bug in MSVC 2013's installation software, it is possible\r
4 # for MSVC 2013 to write the DIA SDK into the Visual Studio 2012\r
5 # install directory.  If this happens, the installation is corrupt\r
6 # and there's nothing we can do.  It happens with enough frequency\r
7 # though that we should handle it.  We do so by simply checking that\r
8 # the DIA SDK folder exists.  Should this happen you will need to\r
9 # uninstall VS 2012 and then re-install VS 2013.\r
10 if (IS_DIRECTORY ${MSVC_DIA_SDK_DIR})\r
11   set(LLVM_LINK_COMPONENTS\r
12     Support\r
13     )\r
14 \r
15   include_directories(${MSVC_DIA_SDK_DIR}/include)\r
16   if (CMAKE_SIZEOF_VOID_P EQUAL 8)\r
17     link_directories(${MSVC_DIA_SDK_DIR}/lib/amd64)\r
18   else()\r
19     link_directories(${MSVC_DIA_SDK_DIR}/lib)\r
20   endif()\r
21 \r
22   add_llvm_tool(llvm-pdbdump\r
23     llvm-pdbdump.cpp\r
24     DIAExtras.cpp\r
25     DIASymbol.cpp\r
26     )\r
27   target_link_libraries(llvm-pdbdump diaguids)\r
28 endif()\r