InstallRequiredSystemLibraries.cmake 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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 CMAKE_SKIP_INSTALL_RULES is set to TRUE before including
  4. # this file, then the INSTALL command is not called. The use can use
  5. # the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install
  6. # command and install them into any directory they want.
  7. # If it is the MSVC compiler, then the microsoft run
  8. # time libraries will be found add automatically added to the
  9. # CMAKE_INSTALL_DEBUG_LIBRARIES, and installed.
  10. # If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC
  11. # compiler, then the debug libraries are installed when available.
  12. # If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time
  13. # libraries are installed as well as the CRT run time libraries.
  14. IF(MSVC)
  15. FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
  16. IF(MSVC70)
  17. SET(__install__libs
  18. "${SYSTEMROOT}/system32/msvcp70.dll"
  19. "${SYSTEMROOT}/system32/msvcr70.dll"
  20. )
  21. ENDIF(MSVC70)
  22. IF(MSVC71)
  23. SET(__install__libs
  24. "${SYSTEMROOT}/system32/msvcp71.dll"
  25. "${SYSTEMROOT}/system32/msvcr71.dll"
  26. )
  27. ENDIF(MSVC71)
  28. IF(MSVC80)
  29. # Find the runtime library redistribution directory.
  30. FIND_PATH(MSVC80_REDIST_DIR NAMES x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
  31. PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
  32. )
  33. MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
  34. SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.CRT")
  35. # Install the manifest that allows DLLs to be loaded from the
  36. # directory containing the executable.
  37. SET(__install__libs
  38. "${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest"
  39. "${MSVC80_CRT_DIR}/msvcm80.dll"
  40. "${MSVC80_CRT_DIR}/msvcp80.dll"
  41. "${MSVC80_CRT_DIR}/msvcr80.dll"
  42. )
  43. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  44. SET(MSVC80_CRT_DIR
  45. "${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT")
  46. SET(__install__libs ${__install__libs}
  47. "${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
  48. "${MSVC80_CRT_DIR}/msvcm80d.dll"
  49. "${MSVC80_CRT_DIR}/msvcp80d.dll"
  50. "${MSVC80_CRT_DIR}/msvcr80d.dll"
  51. )
  52. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  53. ENDIF(MSVC80)
  54. IF(MSVC90)
  55. # Find the runtime library redistribution directory.
  56. FIND_PATH(MSVC90_REDIST_DIR NAMES x86/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
  57. PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist"
  58. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist"
  59. )
  60. MARK_AS_ADVANCED(MSVC90_REDIST_DIR)
  61. SET(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/x86/Microsoft.VC90.CRT")
  62. # Install the manifest that allows DLLs to be loaded from the
  63. # directory containing the executable.
  64. SET(__install__libs
  65. "${MSVC90_CRT_DIR}/Microsoft.VC90.CRT.manifest"
  66. "${MSVC90_CRT_DIR}/msvcm90.dll"
  67. "${MSVC90_CRT_DIR}/msvcp90.dll"
  68. "${MSVC90_CRT_DIR}/msvcr90.dll"
  69. )
  70. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  71. SET(MSVC90_CRT_DIR
  72. "${MSVC90_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC90.DebugCRT")
  73. SET(__install__libs ${__install__libs}
  74. "${MSVC90_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest"
  75. "${MSVC90_CRT_DIR}/msvcm90d.dll"
  76. "${MSVC90_CRT_DIR}/msvcp90d.dll"
  77. "${MSVC90_CRT_DIR}/msvcr90d.dll"
  78. )
  79. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  80. ENDIF(MSVC90)
  81. IF(CMAKE_INSTALL_MFC_LIBRARIES)
  82. IF(MSVC70)
  83. SET(__install__libs ${__install__libs}
  84. "${SYSTEMROOT}/system32/mfc70.dll"
  85. )
  86. ENDIF(MSVC70)
  87. IF(MSVC71)
  88. SET(__install__libs ${__install__libs}
  89. "${SYSTEMROOT}/system32/mfc71.dll"
  90. )
  91. ENDIF(MSVC71)
  92. IF(MSVC80)
  93. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  94. SET(MSVC80_MFC_DIR
  95. "${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugMFC")
  96. SET(__install__libs ${__install__libs}
  97. "${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
  98. "${MSVC80_MFC_DIR}/mfc80d.dll"
  99. "${MSVC80_MFC_DIR}/mfc80ud.dll"
  100. "${MSVC80_MFC_DIR}/mfcm80d.dll"
  101. "${MSVC80_MFC_DIR}/mfcm80ud.dll"
  102. )
  103. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  104. SET(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFC")
  105. # Install the manifest that allows DLLs to be loaded from the
  106. # directory containing the executable.
  107. SET(__install__libs ${__install__libs}
  108. "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
  109. "${MSVC80_MFC_DIR}/mfc80.dll"
  110. "${MSVC80_MFC_DIR}/mfc80u.dll"
  111. "${MSVC80_MFC_DIR}/mfcm80.dll"
  112. "${MSVC80_MFC_DIR}/mfcm80u.dll"
  113. )
  114. # include the language dll's for vs8 as well as the actuall dll's
  115. SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFCLOC")
  116. # Install the manifest that allows DLLs to be loaded from the
  117. # directory containing the executable.
  118. SET(__install__libs ${__install__libs}
  119. "${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
  120. "${MSVC80_MFCLOC_DIR}/mfc80chs.dll"
  121. "${MSVC80_MFCLOC_DIR}/mfc80cht.dll"
  122. "${MSVC80_MFCLOC_DIR}/mfc80enu.dll"
  123. "${MSVC80_MFCLOC_DIR}/mfc80esp.dll"
  124. "${MSVC80_MFCLOC_DIR}/mfc80deu.dll"
  125. "${MSVC80_MFCLOC_DIR}/mfc80fra.dll"
  126. "${MSVC80_MFCLOC_DIR}/mfc80ita.dll"
  127. "${MSVC80_MFCLOC_DIR}/mfc80jpn.dll"
  128. "${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
  129. )
  130. ENDIF(MSVC80)
  131. IF(MSVC90)
  132. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  133. SET(MSVC90_MFC_DIR
  134. "${MSVC90_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC90.DebugMFC")
  135. SET(__install__libs ${__install__libs}
  136. "${MSVC90_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest"
  137. "${MSVC90_MFC_DIR}/mfc90d.dll"
  138. "${MSVC90_MFC_DIR}/mfc90ud.dll"
  139. "${MSVC90_MFC_DIR}/mfcm90d.dll"
  140. "${MSVC90_MFC_DIR}/mfcm90ud.dll"
  141. )
  142. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  143. SET(MSVC90_MFC_DIR "${MSVC90_REDIST_DIR}/x86/Microsoft.VC90.MFC")
  144. # Install the manifest that allows DLLs to be loaded from the
  145. # directory containing the executable.
  146. SET(__install__libs ${__install__libs}
  147. "${MSVC90_MFC_DIR}/Microsoft.VC90.MFC.manifest"
  148. "${MSVC90_MFC_DIR}/mfc90.dll"
  149. "${MSVC90_MFC_DIR}/mfc90u.dll"
  150. "${MSVC90_MFC_DIR}/mfcm90.dll"
  151. "${MSVC90_MFC_DIR}/mfcm90u.dll"
  152. )
  153. # include the language dll's for vs9 as well as the actuall dll's
  154. SET(MSVC90_MFCLOC_DIR "${MSVC90_REDIST_DIR}/x86/Microsoft.VC90.MFCLOC")
  155. # Install the manifest that allows DLLs to be loaded from the
  156. # directory containing the executable.
  157. SET(__install__libs ${__install__libs}
  158. "${MSVC90_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest"
  159. "${MSVC90_MFCLOC_DIR}/mfc90chs.dll"
  160. "${MSVC90_MFCLOC_DIR}/mfc90cht.dll"
  161. "${MSVC90_MFCLOC_DIR}/mfc90enu.dll"
  162. "${MSVC90_MFCLOC_DIR}/mfc90esp.dll"
  163. "${MSVC90_MFCLOC_DIR}/mfc90deu.dll"
  164. "${MSVC90_MFCLOC_DIR}/mfc90fra.dll"
  165. "${MSVC90_MFCLOC_DIR}/mfc90ita.dll"
  166. "${MSVC90_MFCLOC_DIR}/mfc90jpn.dll"
  167. "${MSVC90_MFCLOC_DIR}/mfc90kor.dll"
  168. )
  169. ENDIF(MSVC90)
  170. ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
  171. FOREACH(lib
  172. ${__install__libs}
  173. )
  174. IF(EXISTS ${lib})
  175. SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
  176. ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
  177. ENDIF(EXISTS ${lib})
  178. ENDFOREACH(lib)
  179. ENDIF(MSVC)
  180. # Include system runtime libraries in the installation if any are
  181. # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
  182. IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
  183. IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
  184. IF(WIN32)
  185. INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  186. ELSE(WIN32)
  187. INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  188. ENDIF(WIN32)
  189. ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
  190. ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)