llvm.org GIT mirror llvm / 002062b
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 Reid Kleckner 7 years ago
4 changed file(s) with 37 addition(s) and 30 deletion(s). Raw diff Collapse all Expand all
3333 set(PACKAGE_NAME LLVM)
3434 set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
3535 set(PACKAGE_BUGREPORT "http://llvm.org/bugs/")
36
37 # Configure CPack.
38 set(CPACK_PACKAGE_VENDOR "LLVM")
39 set(CPACK_PACKAGE_VERSION_MAJOR ${LLVM_VERSION_MAJOR})
40 set(CPACK_PACKAGE_VERSION_MINOR ${LLVM_VERSION_MINOR})
41 if( LLVM_APPEND_VC_REV )
42 add_version_info_from_vcs(CPACK_PACKAGE_VERSION_PATCH)
43 else()
44 set(CPACK_PACKAGE_VERSION_PATCH "svn")
45 endif()
46 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT")
47 if(WIN32 AND NOT UNIX)
48 set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\cmake\\\\nsis_logo.bmp")
49 set(CPACK_NSIS_MODIFY_PATH "ON")
50 set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
51 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
52 "ExecWait '$INSTDIR/tools/msbuild/install.bat'")
53 set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
54 "ExecWait '$INSTDIR/tools/msbuild/uninstall.bat'")
55 endif()
56 include(CPack)
3657
3758 # Sanity check our source directory to make sure that we are not trying to
3859 # generate an in-tree build (unless on MSVC_IDE, where it is ok), and to make
499520 )
500521 endif()
501522
502 set(CPACK_PACKAGE_VENDOR "LLVM")
503 set(CPACK_PACKAGE_VERSION_MAJOR ${LLVM_VERSION_MAJOR})
504 set(CPACK_PACKAGE_VERSION_MINOR ${LLVM_VERSION_MINOR})
505 if( LLVM_APPEND_VC_REV )
506 add_version_info_from_vcs(CPACK_PACKAGE_VERSION_PATCH)
507 else()
508 set(CPACK_PACKAGE_VERSION_PATCH "svn")
509 endif()
510 set(CPACK_RESOURCE_FILE_LICENSE "${LLVM_MAIN_SRC_DIR}/LICENSE.TXT")
511 if(WIN32 AND NOT UNIX)
512 set(CPACK_PACKAGE_ICON "${LLVM_MAIN_SRC_DIR}\\\\cmake\\\\nsis_logo.bmp")
513 set(CPACK_NSIS_MODIFY_PATH "ON")
514 set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
515 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
516 "ExecWait '$INSTDIR/tools/msbuild/install.bat'")
517 set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
518 "ExecWait '$INSTDIR/tools/msbuild/uninstall.bat'")
519 endif()
520 include(CPack)
521
522523 # Workaround for MSVS10 to avoid the Dialog Hell
523524 # FIXME: This could be removed with future version of CMake.
524525 if(MSVC_VERSION EQUAL 1600)
0 if (WIN32)
1 set(prop_file "Microsoft.Cpp.Win32.llvm.props")
2
3 # CPack will install a registry key in this format that we wish to reference.
4 set(REG_KEY "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION}")
5 configure_file(${prop_file}.in ${prop_file})
6 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file}" DESTINATION tools/msbuild)
7
18 install(DIRECTORY .
29 DESTINATION tools/msbuild
310 FILES_MATCHING
411 PATTERN "*.targets"
5 PATTERN "*.props"
612 PATTERN "*.bat"
713 PATTERN ".svn" EXCLUDE
814 )
+0
-9
tools/msbuild/Microsoft.Cpp.Win32.llvm.props less more
None 
1
2
3
4 $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM 3.4.svn)
5 $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM 3.4.svn)
6 $(ClangInstallDir)\msbuild-bin;$(ExecutablePath)
7
8
0 
1
2
3
4 $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\@REG_KEY@)
5 $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\@REG_KEY@)
6 $(LLVMInstallDir)\msbuild-bin;$(ExecutablePath)
7
8