1
0

InstallRequiredSystemLibraries.cmake 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # By including this file, all files in the CMAKE_INSTALL_DEBUG_LIBRARIES,
  2. # will be installed with INSTALL_PROGRAMS into /bin for WIN32 and /lib
  3. # for non-win32. If it is the MSVC compiler, then the microsoft run
  4. # time libraries will be found add automatically added to the
  5. # CMAKE_INSTALL_DEBUG_LIBRARIES, and installed.
  6. # If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC
  7. # compiler, then the debug libraries are installed when available.
  8. # If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time
  9. # libraries are installed as well as the CRT run time libraries.
  10. IF(MSVC)
  11. FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
  12. IF(MSVC70)
  13. SET(__install__libs
  14. "${SYSTEMROOT}/system32/msvcp70.dll"
  15. "${SYSTEMROOT}/system32/msvcr70.dll"
  16. )
  17. ENDIF(MSVC70)
  18. IF(MSVC71)
  19. SET(__install__libs
  20. "${SYSTEMROOT}/system32/msvcp71.dll"
  21. "${SYSTEMROOT}/system32/msvcr71.dll"
  22. )
  23. ENDIF(MSVC71)
  24. IF(MSVC80)
  25. # Find the runtime library redistribution directory.
  26. FIND_PATH(MSVC80_REDIST_DIR NAMES x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
  27. PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
  28. )
  29. MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
  30. SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.CRT")
  31. # Install the manifest that allows DLLs to be loaded from the
  32. # directory containing the executable.
  33. SET(__install__libs
  34. "${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest"
  35. "${MSVC80_CRT_DIR}/msvcm80.dll"
  36. "${MSVC80_CRT_DIR}/msvcp80.dll"
  37. "${MSVC80_CRT_DIR}/msvcr80.dll"
  38. )
  39. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  40. SET(MSVC80_CRT_DIR
  41. "${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT")
  42. SET(__install__libs ${__install__libs}
  43. "${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
  44. "${MSVC80_CRT_DIR}/msvcm80d.dll"
  45. "${MSVC80_CRT_DIR}/msvcp80d.dll"
  46. "${MSVC80_CRT_DIR}/msvcr80d.dll"
  47. )
  48. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  49. ENDIF(MSVC80)
  50. IF(CMAKE_INSTALL_MFC_LIBRARIES)
  51. IF(MSVC70)
  52. SET(__install__libs ${__install__libs}
  53. "${SYSTEMROOT}/system32/mfc70.dll"
  54. )
  55. ENDIF(MSVC70)
  56. IF(MSVC71)
  57. SET(__install__libs ${__install__libs}
  58. "${SYSTEMROOT}/system32/mfc71.dll"
  59. )
  60. ENDIF(MSVC71)
  61. IF(MSVC80)
  62. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  63. SET(MSVC80_MFC_DIR
  64. "${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugMFC")
  65. SET(__install__libs ${__install__libs}
  66. "${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
  67. "${MSVC80_MFC_DIR}/mfc80d.dll"
  68. "${MSVC80_MFC_DIR}/mfc80ud.dll"
  69. "${MSVC80_MFC_DIR}/mfcm80d.dll"
  70. "${MSVC80_MFC_DIR}/mfcm80ud.dll"
  71. )
  72. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  73. SET(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFC")
  74. # Install the manifest that allows DLLs to be loaded from the
  75. # directory containing the executable.
  76. SET(__install__libs ${__install__libs}
  77. "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
  78. "${MSVC80_MFC_DIR}/mfc80.dll"
  79. "${MSVC80_MFC_DIR}/mfc80u.dll"
  80. "${MSVC80_MFC_DIR}/mfcm80.dll"
  81. "${MSVC80_MFC_DIR}/mfcm80u.dll"
  82. )
  83. ENDIF(MSVC80)
  84. IF(MSVC80)
  85. # include the language dll's for vs8 as well as the actuall dll's
  86. SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFCLOC")
  87. # Install the manifest that allows DLLs to be loaded from the
  88. # directory containing the executable.
  89. SET(__install__libs ${__install__libs}
  90. "${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
  91. "${MSVC80_MFCLOC_DIR}/mfc80chs.dll"
  92. "${MSVC80_MFCLOC_DIR}/mfc80cht.dll"
  93. "${MSVC80_MFCLOC_DIR}/mfc80enu.dll"
  94. "${MSVC80_MFCLOC_DIR}/mfc80esp.dll"
  95. "${MSVC80_MFCLOC_DIR}/mfc80deu.dll"
  96. "${MSVC80_MFCLOC_DIR}/mfc80fra.dll"
  97. "${MSVC80_MFCLOC_DIR}/mfc80ita.dll"
  98. "${MSVC80_MFCLOC_DIR}/mfc80jpn.dll"
  99. "${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
  100. )
  101. ENDIF(MSVC80)
  102. ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
  103. FOREACH(lib
  104. ${__install__libs}
  105. )
  106. IF(EXISTS ${lib})
  107. SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
  108. ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
  109. ENDIF(EXISTS ${lib})
  110. ENDFOREACH(lib)
  111. ENDIF(MSVC)
  112. # Include system runtime libraries in the installation if any are
  113. # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
  114. IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
  115. IF(WIN32)
  116. INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  117. ELSE(WIN32)
  118. INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  119. ENDIF(WIN32)
  120. ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)