InstallRequiredSystemLibraries.cmake 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. ENDIF(MSVC80)
  115. IF(MSVC80)
  116. # include the language dll's for vs8 as well as the actuall dll's
  117. SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFCLOC")
  118. # Install the manifest that allows DLLs to be loaded from the
  119. # directory containing the executable.
  120. SET(__install__libs ${__install__libs}
  121. "${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
  122. "${MSVC80_MFCLOC_DIR}/mfc80chs.dll"
  123. "${MSVC80_MFCLOC_DIR}/mfc80cht.dll"
  124. "${MSVC80_MFCLOC_DIR}/mfc80enu.dll"
  125. "${MSVC80_MFCLOC_DIR}/mfc80esp.dll"
  126. "${MSVC80_MFCLOC_DIR}/mfc80deu.dll"
  127. "${MSVC80_MFCLOC_DIR}/mfc80fra.dll"
  128. "${MSVC80_MFCLOC_DIR}/mfc80ita.dll"
  129. "${MSVC80_MFCLOC_DIR}/mfc80jpn.dll"
  130. "${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
  131. )
  132. ENDIF(MSVC80)
  133. ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
  134. FOREACH(lib
  135. ${__install__libs}
  136. )
  137. IF(EXISTS ${lib})
  138. SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
  139. ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
  140. ENDIF(EXISTS ${lib})
  141. ENDFOREACH(lib)
  142. ENDIF(MSVC)
  143. # Include system runtime libraries in the installation if any are
  144. # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
  145. IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
  146. IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
  147. IF(WIN32)
  148. INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  149. ELSE(WIN32)
  150. INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  151. ENDIF(WIN32)
  152. ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
  153. ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)