1
0

InstallRequiredSystemLibraries.cmake 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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 user 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 and 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. #=============================================================================
  15. # Copyright 2006-2009 Kitware, Inc.
  16. #
  17. # Distributed under the OSI-approved BSD License (the "License");
  18. # see accompanying file Copyright.txt for details.
  19. #
  20. # This software is distributed WITHOUT ANY WARRANTY; without even the
  21. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  22. # See the License for more information.
  23. #=============================================================================
  24. # (To distribute this file outside of CMake, substitute the full
  25. # License text for the above reference.)
  26. IF(MSVC)
  27. FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
  28. IF(MSVC70)
  29. SET(__install__libs
  30. "${SYSTEMROOT}/system32/msvcp70.dll"
  31. "${SYSTEMROOT}/system32/msvcr70.dll"
  32. )
  33. ENDIF(MSVC70)
  34. IF(MSVC71)
  35. SET(__install__libs
  36. "${SYSTEMROOT}/system32/msvcp71.dll"
  37. "${SYSTEMROOT}/system32/msvcr71.dll"
  38. )
  39. ENDIF(MSVC71)
  40. IF(CMAKE_CL_64)
  41. SET(CMAKE_MSVC_ARCH amd64)
  42. ELSE(CMAKE_CL_64)
  43. SET(CMAKE_MSVC_ARCH x86)
  44. ENDIF(CMAKE_CL_64)
  45. GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
  46. GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
  47. IF(MSVC80)
  48. # Find the runtime library redistribution directory.
  49. FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
  50. PATHS
  51. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
  52. "${base_dir}/VC/redist"
  53. )
  54. MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
  55. SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
  56. # Install the manifest that allows DLLs to be loaded from the
  57. # directory containing the executable.
  58. SET(__install__libs
  59. "${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest"
  60. "${MSVC80_CRT_DIR}/msvcm80.dll"
  61. "${MSVC80_CRT_DIR}/msvcp80.dll"
  62. "${MSVC80_CRT_DIR}/msvcr80.dll"
  63. )
  64. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  65. SET(MSVC80_CRT_DIR
  66. "${MSVC80_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugCRT")
  67. SET(__install__libs ${__install__libs}
  68. "${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
  69. "${MSVC80_CRT_DIR}/msvcm80d.dll"
  70. "${MSVC80_CRT_DIR}/msvcp80d.dll"
  71. "${MSVC80_CRT_DIR}/msvcr80d.dll"
  72. )
  73. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  74. ENDIF(MSVC80)
  75. IF(MSVC90)
  76. # Find the runtime library redistribution directory.
  77. FIND_PATH(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
  78. PATHS
  79. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist"
  80. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist"
  81. "${base_dir}/VC/redist"
  82. )
  83. MARK_AS_ADVANCED(MSVC90_REDIST_DIR)
  84. SET(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
  85. # Install the manifest that allows DLLs to be loaded from the
  86. # directory containing the executable.
  87. SET(__install__libs
  88. "${MSVC90_CRT_DIR}/Microsoft.VC90.CRT.manifest"
  89. "${MSVC90_CRT_DIR}/msvcm90.dll"
  90. "${MSVC90_CRT_DIR}/msvcp90.dll"
  91. "${MSVC90_CRT_DIR}/msvcr90.dll"
  92. )
  93. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  94. SET(MSVC90_CRT_DIR
  95. "${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
  96. SET(__install__libs ${__install__libs}
  97. "${MSVC90_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest"
  98. "${MSVC90_CRT_DIR}/msvcm90d.dll"
  99. "${MSVC90_CRT_DIR}/msvcp90d.dll"
  100. "${MSVC90_CRT_DIR}/msvcr90d.dll"
  101. )
  102. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  103. ENDIF(MSVC90)
  104. IF(MSVC10)
  105. # Find the runtime library redistribution directory.
  106. FIND_PATH(MSVC10_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT
  107. PATHS
  108. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../VC/redist"
  109. "${base_dir}/VC/redist"
  110. )
  111. MARK_AS_ADVANCED(MSVC10_REDIST_DIR)
  112. SET(MSVC10_CRT_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT")
  113. # Install the manifest that allows DLLs to be loaded from the
  114. # directory containing the executable.
  115. SET(__install__libs
  116. "${MSVC10_CRT_DIR}/Microsoft.VC100.CRT.manifest"
  117. "${MSVC10_CRT_DIR}/msvcp100.dll"
  118. "${MSVC10_CRT_DIR}/msvcr100.dll"
  119. )
  120. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  121. SET(MSVC10_CRT_DIR
  122. "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
  123. SET(__install__libs ${__install__libs}
  124. "${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
  125. "${MSVC10_CRT_DIR}/msvcp100d.dll"
  126. "${MSVC10_CRT_DIR}/msvcr100d.dll"
  127. )
  128. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  129. ENDIF(MSVC10)
  130. IF(CMAKE_INSTALL_MFC_LIBRARIES)
  131. IF(MSVC70)
  132. SET(__install__libs ${__install__libs}
  133. "${SYSTEMROOT}/system32/mfc70.dll"
  134. )
  135. ENDIF(MSVC70)
  136. IF(MSVC71)
  137. SET(__install__libs ${__install__libs}
  138. "${SYSTEMROOT}/system32/mfc71.dll"
  139. )
  140. ENDIF(MSVC71)
  141. IF(MSVC80)
  142. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  143. SET(MSVC80_MFC_DIR
  144. "${MSVC80_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugMFC")
  145. SET(__install__libs ${__install__libs}
  146. "${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
  147. "${MSVC80_MFC_DIR}/mfc80d.dll"
  148. "${MSVC80_MFC_DIR}/mfc80ud.dll"
  149. "${MSVC80_MFC_DIR}/mfcm80d.dll"
  150. "${MSVC80_MFC_DIR}/mfcm80ud.dll"
  151. )
  152. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  153. SET(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC")
  154. # Install the manifest that allows DLLs to be loaded from the
  155. # directory containing the executable.
  156. SET(__install__libs ${__install__libs}
  157. "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
  158. "${MSVC80_MFC_DIR}/mfc80.dll"
  159. "${MSVC80_MFC_DIR}/mfc80u.dll"
  160. "${MSVC80_MFC_DIR}/mfcm80.dll"
  161. "${MSVC80_MFC_DIR}/mfcm80u.dll"
  162. )
  163. # include the language dll's for vs8 as well as the actuall dll's
  164. SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
  165. # Install the manifest that allows DLLs to be loaded from the
  166. # directory containing the executable.
  167. SET(__install__libs ${__install__libs}
  168. "${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
  169. "${MSVC80_MFCLOC_DIR}/mfc80chs.dll"
  170. "${MSVC80_MFCLOC_DIR}/mfc80cht.dll"
  171. "${MSVC80_MFCLOC_DIR}/mfc80enu.dll"
  172. "${MSVC80_MFCLOC_DIR}/mfc80esp.dll"
  173. "${MSVC80_MFCLOC_DIR}/mfc80deu.dll"
  174. "${MSVC80_MFCLOC_DIR}/mfc80fra.dll"
  175. "${MSVC80_MFCLOC_DIR}/mfc80ita.dll"
  176. "${MSVC80_MFCLOC_DIR}/mfc80jpn.dll"
  177. "${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
  178. )
  179. ENDIF(MSVC80)
  180. IF(MSVC90)
  181. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  182. SET(MSVC90_MFC_DIR
  183. "${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugMFC")
  184. SET(__install__libs ${__install__libs}
  185. "${MSVC90_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest"
  186. "${MSVC90_MFC_DIR}/mfc90d.dll"
  187. "${MSVC90_MFC_DIR}/mfc90ud.dll"
  188. "${MSVC90_MFC_DIR}/mfcm90d.dll"
  189. "${MSVC90_MFC_DIR}/mfcm90ud.dll"
  190. )
  191. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  192. SET(MSVC90_MFC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC")
  193. # Install the manifest that allows DLLs to be loaded from the
  194. # directory containing the executable.
  195. SET(__install__libs ${__install__libs}
  196. "${MSVC90_MFC_DIR}/Microsoft.VC90.MFC.manifest"
  197. "${MSVC90_MFC_DIR}/mfc90.dll"
  198. "${MSVC90_MFC_DIR}/mfc90u.dll"
  199. "${MSVC90_MFC_DIR}/mfcm90.dll"
  200. "${MSVC90_MFC_DIR}/mfcm90u.dll"
  201. )
  202. # include the language dll's for vs9 as well as the actuall dll's
  203. SET(MSVC90_MFCLOC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
  204. # Install the manifest that allows DLLs to be loaded from the
  205. # directory containing the executable.
  206. SET(__install__libs ${__install__libs}
  207. "${MSVC90_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest"
  208. "${MSVC90_MFCLOC_DIR}/mfc90chs.dll"
  209. "${MSVC90_MFCLOC_DIR}/mfc90cht.dll"
  210. "${MSVC90_MFCLOC_DIR}/mfc90enu.dll"
  211. "${MSVC90_MFCLOC_DIR}/mfc90esp.dll"
  212. "${MSVC90_MFCLOC_DIR}/mfc90deu.dll"
  213. "${MSVC90_MFCLOC_DIR}/mfc90fra.dll"
  214. "${MSVC90_MFCLOC_DIR}/mfc90ita.dll"
  215. "${MSVC90_MFCLOC_DIR}/mfc90jpn.dll"
  216. "${MSVC90_MFCLOC_DIR}/mfc90kor.dll"
  217. )
  218. ENDIF(MSVC90)
  219. IF(MSVC10)
  220. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  221. SET(MSVC10_MFC_DIR
  222. "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugMFC")
  223. SET(__install__libs ${__install__libs}
  224. "${MSVC10_MFC_DIR}/Microsoft.VC100.DebugMFC.manifest"
  225. "${MSVC10_MFC_DIR}/mfc100d.dll"
  226. "${MSVC10_MFC_DIR}/mfc100ud.dll"
  227. "${MSVC10_MFC_DIR}/mfcm100d.dll"
  228. "${MSVC10_MFC_DIR}/mfcm100ud.dll"
  229. )
  230. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  231. SET(MSVC10_MFC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFC")
  232. # Install the manifest that allows DLLs to be loaded from the
  233. # directory containing the executable.
  234. SET(__install__libs ${__install__libs}
  235. "${MSVC10_MFC_DIR}/Microsoft.VC100.MFC.manifest"
  236. "${MSVC10_MFC_DIR}/mfc100.dll"
  237. "${MSVC10_MFC_DIR}/mfc100u.dll"
  238. "${MSVC10_MFC_DIR}/mfcm100.dll"
  239. "${MSVC10_MFC_DIR}/mfcm100u.dll"
  240. )
  241. # include the language dll's for vs10 as well as the actuall dll's
  242. SET(MSVC10_MFCLOC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFCLOC")
  243. # Install the manifest that allows DLLs to be loaded from the
  244. # directory containing the executable.
  245. SET(__install__libs ${__install__libs}
  246. "${MSVC10_MFCLOC_DIR}/Microsoft.VC100.MFCLOC.manifest"
  247. "${MSVC10_MFCLOC_DIR}/mfc100chs.dll"
  248. "${MSVC10_MFCLOC_DIR}/mfc100cht.dll"
  249. "${MSVC10_MFCLOC_DIR}/mfc100enu.dll"
  250. "${MSVC10_MFCLOC_DIR}/mfc100esp.dll"
  251. "${MSVC10_MFCLOC_DIR}/mfc100deu.dll"
  252. "${MSVC10_MFCLOC_DIR}/mfc100fra.dll"
  253. "${MSVC10_MFCLOC_DIR}/mfc100ita.dll"
  254. "${MSVC10_MFCLOC_DIR}/mfc100jpn.dll"
  255. "${MSVC10_MFCLOC_DIR}/mfc100kor.dll"
  256. )
  257. ENDIF(MSVC10)
  258. ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
  259. FOREACH(lib
  260. ${__install__libs}
  261. )
  262. IF(EXISTS ${lib})
  263. SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
  264. ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
  265. ENDIF(EXISTS ${lib})
  266. ENDFOREACH(lib)
  267. ENDIF(MSVC)
  268. # Include system runtime libraries in the installation if any are
  269. # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
  270. IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
  271. IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
  272. IF(WIN32)
  273. INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  274. ELSE(WIN32)
  275. INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  276. ENDIF(WIN32)
  277. ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
  278. ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)