MSBuild integration: get the LibraryPath right (PR18707)
authorHans Wennborg <hans@hanshq.net>
Thu, 13 Feb 2014 22:01:35 +0000 (22:01 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 13 Feb 2014 22:01:35 +0000 (22:01 +0000)
It was pointing to lib\clang\3.4, but now we're on 3.5.
Make CMake insert the right version automatically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201363 91177308-0d34-0410-b5e6-96231b3b80d8

tools/msbuild/CMakeLists.txt
tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in

index f8c2512..b7be71d 100644 (file)
@@ -1,6 +1,7 @@
 if (WIN32)
   # CPack will install a registry key in this format that we wish to reference.
   set(REG_KEY "${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}")
+  set(LIB_PATH_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
 
   foreach (platform "Win32" "x64")
     set(prop_file_in "Microsoft.Cpp.Win32.llvm.props.in")
@@ -45,6 +46,7 @@ if (WIN32)
     install(FILES "toolset-vs2013_xp.targets" DESTINATION "tools/msbuild/${platform}")
   endforeach()
 
+  set(LIB_PATH_VERSION)
   set(REG_KEY)
 
   install(DIRECTORY .
index 78cd8e2..a775c31 100644 (file)
@@ -6,7 +6,7 @@
     <LLVMInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\@REG_KEY@)</LLVMInstallDir>\r
     <LLVMInstallDir Condition="'$(LLVMInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\@REG_KEY@)</LLVMInstallDir>\r
     <ExecutablePath>$(LLVMInstallDir)\msbuild-bin;$(ExecutablePath)</ExecutablePath>\r
-    <LibraryPath>$(LLVMInstallDir)\lib\clang\3.4\lib\windows;$(LibraryPath)</LibraryPath>\r
+    <LibraryPath>$(LLVMInstallDir)\lib\clang\@LIB_PATH_VERSION@\lib\windows;$(LibraryPath)</LibraryPath>\r
   </PropertyGroup>\r
 \r
   <ItemDefinitionGroup>\r