From 002062b024c094279d4b0ed7db13a69159b2d8ba Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 29 Aug 2013 22:09:43 +0000 Subject: Substitute LLVM's version into the msbuild property file at config time Requires shuffling the CPack code up before add_subdirectory(tools), but that's where the version settings are anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189615 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/msbuild/CMakeLists.txt | 8 +++++++- tools/msbuild/Microsoft.Cpp.Win32.llvm.props | 9 --------- tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in | 9 +++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 tools/msbuild/Microsoft.Cpp.Win32.llvm.props create mode 100644 tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in (limited to 'tools/msbuild') diff --git a/tools/msbuild/CMakeLists.txt b/tools/msbuild/CMakeLists.txt index a1dca8aca8..393b22a72c 100644 --- a/tools/msbuild/CMakeLists.txt +++ b/tools/msbuild/CMakeLists.txt @@ -1,9 +1,15 @@ if (WIN32) + set(prop_file "Microsoft.Cpp.Win32.llvm.props") + + # CPack will install a registry key in this format that we wish to reference. + set(REG_KEY "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION}") + configure_file(${prop_file}.in ${prop_file}) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file}" DESTINATION tools/msbuild) + install(DIRECTORY . DESTINATION tools/msbuild FILES_MATCHING PATTERN "*.targets" - PATTERN "*.props" PATTERN "*.bat" PATTERN ".svn" EXCLUDE ) diff --git a/tools/msbuild/Microsoft.Cpp.Win32.llvm.props b/tools/msbuild/Microsoft.Cpp.Win32.llvm.props deleted file mode 100644 index 12938f4a6d..0000000000 --- a/tools/msbuild/Microsoft.Cpp.Win32.llvm.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - - $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM 3.4.svn) - $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM 3.4.svn) - $(ClangInstallDir)\msbuild-bin;$(ExecutablePath) - - diff --git a/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in b/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in new file mode 100644 index 0000000000..0f474c0e9e --- /dev/null +++ b/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in @@ -0,0 +1,9 @@ + + + + + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\@REG_KEY@) + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\@REG_KEY@) + $(LLVMInstallDir)\msbuild-bin;$(ExecutablePath) + + -- cgit v1.2.3