InstallRequiredSystemLibraries.cmake 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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(CMAKE_INSTALL_MFC_LIBRARIES)
  55. IF(MSVC70)
  56. SET(__install__libs ${__install__libs}
  57. "${SYSTEMROOT}/system32/mfc70.dll"
  58. )
  59. ENDIF(MSVC70)
  60. IF(MSVC71)
  61. SET(__install__libs ${__install__libs}
  62. "${SYSTEMROOT}/system32/mfc71.dll"
  63. )
  64. ENDIF(MSVC71)
  65. IF(MSVC80)
  66. IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  67. SET(MSVC80_MFC_DIR
  68. "${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugMFC")
  69. SET(__install__libs ${__install__libs}
  70. "${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
  71. "${MSVC80_MFC_DIR}/mfc80d.dll"
  72. "${MSVC80_MFC_DIR}/mfc80ud.dll"
  73. "${MSVC80_MFC_DIR}/mfcm80d.dll"
  74. "${MSVC80_MFC_DIR}/mfcm80ud.dll"
  75. )
  76. ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
  77. SET(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFC")
  78. # Install the manifest that allows DLLs to be loaded from the
  79. # directory containing the executable.
  80. SET(__install__libs ${__install__libs}
  81. "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
  82. "${MSVC80_MFC_DIR}/mfc80.dll"
  83. "${MSVC80_MFC_DIR}/mfc80u.dll"
  84. "${MSVC80_MFC_DIR}/mfcm80.dll"
  85. "${MSVC80_MFC_DIR}/mfcm80u.dll"
  86. )
  87. ENDIF(MSVC80)
  88. IF(MSVC80)
  89. # include the language dll's for vs8 as well as the actuall dll's
  90. SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFCLOC")
  91. # Install the manifest that allows DLLs to be loaded from the
  92. # directory containing the executable.
  93. SET(__install__libs ${__install__libs}
  94. "${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
  95. "${MSVC80_MFCLOC_DIR}/mfc80chs.dll"
  96. "${MSVC80_MFCLOC_DIR}/mfc80cht.dll"
  97. "${MSVC80_MFCLOC_DIR}/mfc80enu.dll"
  98. "${MSVC80_MFCLOC_DIR}/mfc80esp.dll"
  99. "${MSVC80_MFCLOC_DIR}/mfc80deu.dll"
  100. "${MSVC80_MFCLOC_DIR}/mfc80fra.dll"
  101. "${MSVC80_MFCLOC_DIR}/mfc80ita.dll"
  102. "${MSVC80_MFCLOC_DIR}/mfc80jpn.dll"
  103. "${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
  104. )
  105. ENDIF(MSVC80)
  106. ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
  107. FOREACH(lib
  108. ${__install__libs}
  109. )
  110. IF(EXISTS ${lib})
  111. SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
  112. ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
  113. ENDIF(EXISTS ${lib})
  114. ENDFOREACH(lib)
  115. ENDIF(MSVC)
  116. # Include system runtime libraries in the installation if any are
  117. # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
  118. IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
  119. IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
  120. IF(WIN32)
  121. INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  122. ELSE(WIN32)
  123. INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
  124. ENDIF(WIN32)
  125. ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
  126. ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)