1 # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 # file Copyright.txt or https://cmake.org/licensing for details.
5 # InstallRequiredSystemLibraries
6 # ------------------------------
8 # Include this module to search for compiler-provided system runtime
9 # libraries and add install rules for them. Some optional variables
10 # may be set prior to including the module to adjust behavior:
12 # ``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS``
13 # Specify additional runtime libraries that may not be detected.
14 # After inclusion any detected libraries will be appended to this.
16 # ``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP``
17 # Set to TRUE to skip calling the :command:`install(PROGRAMS)` command to
18 # allow the includer to specify its own install rule, using the value of
19 # ``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS`` to get the list of libraries.
21 # ``CMAKE_INSTALL_DEBUG_LIBRARIES``
22 # Set to TRUE to install the debug runtime libraries when available
25 # ``CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY``
26 # Set to TRUE to install only the debug runtime libraries with MSVC
27 # tools even if the release runtime libraries are also available.
29 # ``CMAKE_INSTALL_UCRT_LIBRARIES``
30 # Set to TRUE to install the Windows Universal CRT libraries for
31 # app-local deployment (e.g. to Windows XP). This is meaningful
32 # only with MSVC from Visual Studio 2015 or higher.
34 # One may set a ``CMAKE_WINDOWS_KITS_10_DIR`` *environment variable*
35 # to an absolute path to tell CMake to look for Windows 10 SDKs in
36 # a custom location. The specified directory is expected to contain
37 # ``Redist/ucrt/DLLs/*`` directories.
39 # ``CMAKE_INSTALL_MFC_LIBRARIES``
40 # Set to TRUE to install the MSVC MFC runtime libraries.
42 # ``CMAKE_INSTALL_OPENMP_LIBRARIES``
43 # Set to TRUE to install the MSVC OpenMP runtime libraries
45 # ``CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION``
46 # Specify the :command:`install(PROGRAMS)` command ``DESTINATION``
47 # option. If not specified, the default is ``bin`` on Windows
48 # and ``lib`` elsewhere.
50 # ``CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS``
51 # Set to TRUE to disable warnings about required library files that
52 # do not exist. (For example, Visual Studio Express editions may
53 # not provide the redistributable files.)
55 # ``CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT``
56 # Specify the :command:`install(PROGRAMS)` command ``COMPONENT``
57 # option. If not specified, no such option will be used.
60 cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced
62 set(_IRSL_HAVE_Intel FALSE)
63 set(_IRSL_HAVE_MSVC FALSE)
64 foreach(LANG IN ITEMS C CXX Fortran)
65 if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Intel")
66 if(NOT _IRSL_HAVE_Intel)
67 get_filename_component(_Intel_basedir "${CMAKE_${LANG}_COMPILER}" PATH)
68 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
69 set(_Intel_archdir intel64)
71 set(_Intel_archdir x86)
73 set(_Intel_compiler_ver ${CMAKE_${LANG}_COMPILER_VERSION})
75 get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../redist/${_Intel_archdir}/compiler" ABSOLUTE)
77 get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../compiler/lib" ABSOLUTE)
79 if(EXISTS "${_Intel_basedir}/../lib/${_Intel_archdir}_lin")
80 get_filename_component(_Intel_redistdir "${_Intel_basedir}/../lib/${_Intel_archdir}" ABSOLUTE)
82 get_filename_component(_Intel_redistdir "${_Intel_basedir}/../../compiler/lib/${_Intel_archdir}_lin" ABSOLUTE)
85 set(_IRSL_HAVE_Intel TRUE)
87 elseif("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "MSVC")
88 set(_IRSL_HAVE_MSVC TRUE)
93 file(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
96 if(MSVC_VERSION GREATER 1599)
98 set(CMAKE_MSVC_ARCH x64)
101 set(CMAKE_MSVC_ARCH amd64)
104 set(CMAKE_MSVC_ARCH x86)
107 get_filename_component(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
108 get_filename_component(base_dir "${devenv_dir}/../.." ABSOLUTE)
110 if(MSVC_VERSION EQUAL 1300)
112 "${SYSTEMROOT}/system32/msvcp70.dll"
113 "${SYSTEMROOT}/system32/msvcr70.dll"
117 if(MSVC_VERSION EQUAL 1310)
119 "${SYSTEMROOT}/system32/msvcp71.dll"
120 "${SYSTEMROOT}/system32/msvcr71.dll"
124 if(MSVC_VERSION EQUAL 1400)
125 set(MSVC_REDIST_NAME VC80)
127 # Find the runtime library redistribution directory.
128 get_filename_component(msvc_install_dir
129 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]" ABSOLUTE)
130 if(DEFINED MSVC80_REDIST_DIR AND EXISTS "${MSVC80_REDIST_DIR}")
131 set(MSVC_REDIST_DIR "${MSVC80_REDIST_DIR}") # use old cache entry
133 find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
135 "${msvc_install_dir}/../../VC/redist"
136 "${base_dir}/VC/redist"
138 mark_as_advanced(MSVC_REDIST_DIR)
139 set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
141 # Install the manifest that allows DLLs to be loaded from the
142 # directory containing the executable.
143 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
145 "${MSVC_CRT_DIR}/Microsoft.VC80.CRT.manifest"
146 "${MSVC_CRT_DIR}/msvcm80.dll"
147 "${MSVC_CRT_DIR}/msvcp80.dll"
148 "${MSVC_CRT_DIR}/msvcr80.dll"
154 if(CMAKE_INSTALL_DEBUG_LIBRARIES)
156 "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugCRT")
157 set(__install__libs ${__install__libs}
158 "${MSVC_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
159 "${MSVC_CRT_DIR}/msvcm80d.dll"
160 "${MSVC_CRT_DIR}/msvcp80d.dll"
161 "${MSVC_CRT_DIR}/msvcr80d.dll"
166 if(MSVC_VERSION EQUAL 1500)
167 set(MSVC_REDIST_NAME VC90)
169 # Find the runtime library redistribution directory.
170 get_filename_component(msvc_install_dir
171 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]" ABSOLUTE)
172 get_filename_component(msvc_express_install_dir
173 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]" ABSOLUTE)
174 if(DEFINED MSVC90_REDIST_DIR AND EXISTS "${MSVC90_REDIST_DIR}")
175 set(MSVC_REDIST_DIR "${MSVC90_REDIST_DIR}") # use old cache entry
177 find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
179 "${msvc_install_dir}/../../VC/redist"
180 "${msvc_express_install_dir}/../../VC/redist"
181 "${base_dir}/VC/redist"
183 mark_as_advanced(MSVC_REDIST_DIR)
184 set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
186 # Install the manifest that allows DLLs to be loaded from the
187 # directory containing the executable.
188 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
190 "${MSVC_CRT_DIR}/Microsoft.VC90.CRT.manifest"
191 "${MSVC_CRT_DIR}/msvcm90.dll"
192 "${MSVC_CRT_DIR}/msvcp90.dll"
193 "${MSVC_CRT_DIR}/msvcr90.dll"
199 if(CMAKE_INSTALL_DEBUG_LIBRARIES)
201 "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
202 set(__install__libs ${__install__libs}
203 "${MSVC_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest"
204 "${MSVC_CRT_DIR}/msvcm90d.dll"
205 "${MSVC_CRT_DIR}/msvcp90d.dll"
206 "${MSVC_CRT_DIR}/msvcr90d.dll"
211 set(MSVC_REDIST_NAME "")
212 set(_MSVCRT_DLL_VERSION "")
213 set(_MSVCRT_IDE_VERSION "")
214 if(MSVC_VERSION GREATER_EQUAL 2000)
215 message(WARNING "MSVC ${MSVC_VERSION} not yet supported.")
216 elseif(MSVC_VERSION GREATER_EQUAL 1911)
217 set(MSVC_REDIST_NAME VC141)
218 set(_MSVCRT_DLL_VERSION 140)
219 set(_MSVCRT_IDE_VERSION 15)
220 elseif(MSVC_VERSION EQUAL 1910)
221 set(MSVC_REDIST_NAME VC150)
222 set(_MSVCRT_DLL_VERSION 140)
223 set(_MSVCRT_IDE_VERSION 15)
224 elseif(MSVC_VERSION EQUAL 1900)
225 set(MSVC_REDIST_NAME VC140)
226 set(_MSVCRT_DLL_VERSION 140)
227 set(_MSVCRT_IDE_VERSION 14)
228 elseif(MSVC_VERSION EQUAL 1800)
229 set(MSVC_REDIST_NAME VC120)
230 set(_MSVCRT_DLL_VERSION 120)
231 set(_MSVCRT_IDE_VERSION 12)
232 elseif(MSVC_VERSION EQUAL 1700)
233 set(MSVC_REDIST_NAME VC110)
234 set(_MSVCRT_DLL_VERSION 110)
235 set(_MSVCRT_IDE_VERSION 11)
236 elseif(MSVC_VERSION EQUAL 1600)
237 set(MSVC_REDIST_NAME VC100)
238 set(_MSVCRT_DLL_VERSION 100)
239 set(_MSVCRT_IDE_VERSION 10)
242 if(_MSVCRT_DLL_VERSION)
243 set(v "${_MSVCRT_DLL_VERSION}")
244 set(vs "${_MSVCRT_IDE_VERSION}")
246 # Find the runtime library redistribution directory.
247 if(vs VERSION_LESS 15 AND DEFINED MSVC${vs}_REDIST_DIR AND EXISTS "${MSVC${vs}_REDIST_DIR}")
248 set(MSVC_REDIST_DIR "${MSVC${vs}_REDIST_DIR}") # use old cache entry
250 if(NOT vs VERSION_LESS 15)
251 set(_vs_redist_paths "")
252 cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR) # undocumented query
253 if(IS_DIRECTORY "${_vs_dir}")
254 file(GLOB _vs_redist_paths "${_vs_dir}/VC/Redist/MSVC/*")
258 get_filename_component(_vs_dir
259 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE)
260 set(programfilesx86 "ProgramFiles(x86)")
262 "${_vs_dir}/../../VC/redist"
263 "${base_dir}/VC/redist"
264 "$ENV{ProgramFiles}/Microsoft Visual Studio ${vs}.0/VC/redist"
265 "$ENV{${programfilesx86}}/Microsoft Visual Studio ${vs}.0/VC/redist"
268 unset(programfilesx86)
270 find_path(MSVC_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.CRT PATHS ${_vs_redist_paths})
271 unset(_vs_redist_paths)
272 mark_as_advanced(MSVC_REDIST_DIR)
273 set(MSVC_CRT_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.CRT")
275 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
277 "${MSVC_CRT_DIR}/msvcp${v}.dll"
279 if(NOT vs VERSION_LESS 14)
280 list(APPEND __install__libs
281 "${MSVC_CRT_DIR}/vcruntime${v}.dll"
282 "${MSVC_CRT_DIR}/concrt${v}.dll"
285 list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}.dll")
291 if(CMAKE_INSTALL_DEBUG_LIBRARIES)
293 "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.DebugCRT")
294 set(__install__libs ${__install__libs}
295 "${MSVC_CRT_DIR}/msvcp${v}d.dll"
297 if(NOT vs VERSION_LESS 14)
298 list(APPEND __install__libs
299 "${MSVC_CRT_DIR}/vcruntime${v}d.dll"
300 "${MSVC_CRT_DIR}/concrt${v}d.dll"
303 list(APPEND __install__libs "${MSVC_CRT_DIR}/msvcr${v}d.dll")
307 if(CMAKE_INSTALL_UCRT_LIBRARIES AND NOT vs VERSION_LESS 14)
308 # Find the Windows Kits directory.
309 get_filename_component(windows_kits_dir
310 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE)
311 set(programfilesx86 "ProgramFiles(x86)")
312 find_path(WINDOWS_KITS_DIR NAMES Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll
314 $ENV{CMAKE_WINDOWS_KITS_10_DIR}
315 "${windows_kits_dir}"
316 "$ENV{ProgramFiles}/Windows Kits/10"
317 "$ENV{${programfilesx86}}/Windows Kits/10"
319 mark_as_advanced(WINDOWS_KITS_DIR)
321 # Glob the list of UCRT DLLs.
322 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
323 file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll")
324 list(APPEND __install__libs ${__ucrt_dlls})
326 if(CMAKE_INSTALL_DEBUG_LIBRARIES)
327 file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${CMAKE_MSVC_ARCH}/ucrt/*.dll")
328 list(APPEND __install__libs ${__ucrt_dlls})
333 if(CMAKE_INSTALL_MFC_LIBRARIES)
334 if(MSVC_VERSION EQUAL 1300)
335 set(__install__libs ${__install__libs}
336 "${SYSTEMROOT}/system32/mfc70.dll"
340 if(MSVC_VERSION EQUAL 1310)
341 set(__install__libs ${__install__libs}
342 "${SYSTEMROOT}/system32/mfc71.dll"
346 if(MSVC_VERSION EQUAL 1400)
347 if(CMAKE_INSTALL_DEBUG_LIBRARIES)
349 "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugMFC")
350 set(__install__libs ${__install__libs}
351 "${MSVC_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
352 "${MSVC_MFC_DIR}/mfc80d.dll"
353 "${MSVC_MFC_DIR}/mfc80ud.dll"
354 "${MSVC_MFC_DIR}/mfcm80d.dll"
355 "${MSVC_MFC_DIR}/mfcm80ud.dll"
359 set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC")
360 # Install the manifest that allows DLLs to be loaded from the
361 # directory containing the executable.
362 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
363 set(__install__libs ${__install__libs}
364 "${MSVC_MFC_DIR}/Microsoft.VC80.MFC.manifest"
365 "${MSVC_MFC_DIR}/mfc80.dll"
366 "${MSVC_MFC_DIR}/mfc80u.dll"
367 "${MSVC_MFC_DIR}/mfcm80.dll"
368 "${MSVC_MFC_DIR}/mfcm80u.dll"
372 # include the language dll's for vs8 as well as the actuall dll's
373 set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
374 # Install the manifest that allows DLLs to be loaded from the
375 # directory containing the executable.
376 set(__install__libs ${__install__libs}
377 "${MSVC_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
378 "${MSVC_MFCLOC_DIR}/mfc80chs.dll"
379 "${MSVC_MFCLOC_DIR}/mfc80cht.dll"
380 "${MSVC_MFCLOC_DIR}/mfc80enu.dll"
381 "${MSVC_MFCLOC_DIR}/mfc80esp.dll"
382 "${MSVC_MFCLOC_DIR}/mfc80deu.dll"
383 "${MSVC_MFCLOC_DIR}/mfc80fra.dll"
384 "${MSVC_MFCLOC_DIR}/mfc80ita.dll"
385 "${MSVC_MFCLOC_DIR}/mfc80jpn.dll"
386 "${MSVC_MFCLOC_DIR}/mfc80kor.dll"
390 if(MSVC_VERSION EQUAL 1500)
391 if(CMAKE_INSTALL_DEBUG_LIBRARIES)
393 "${MSVC_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugMFC")
394 set(__install__libs ${__install__libs}
395 "${MSVC_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest"
396 "${MSVC_MFC_DIR}/mfc90d.dll"
397 "${MSVC_MFC_DIR}/mfc90ud.dll"
398 "${MSVC_MFC_DIR}/mfcm90d.dll"
399 "${MSVC_MFC_DIR}/mfcm90ud.dll"
403 set(MSVC_MFC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC")
404 # Install the manifest that allows DLLs to be loaded from the
405 # directory containing the executable.
406 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
407 set(__install__libs ${__install__libs}
408 "${MSVC_MFC_DIR}/Microsoft.VC90.MFC.manifest"
409 "${MSVC_MFC_DIR}/mfc90.dll"
410 "${MSVC_MFC_DIR}/mfc90u.dll"
411 "${MSVC_MFC_DIR}/mfcm90.dll"
412 "${MSVC_MFC_DIR}/mfcm90u.dll"
416 # include the language dll's for vs9 as well as the actuall dll's
417 set(MSVC_MFCLOC_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
418 # Install the manifest that allows DLLs to be loaded from the
419 # directory containing the executable.
420 set(__install__libs ${__install__libs}
421 "${MSVC_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest"
422 "${MSVC_MFCLOC_DIR}/mfc90chs.dll"
423 "${MSVC_MFCLOC_DIR}/mfc90cht.dll"
424 "${MSVC_MFCLOC_DIR}/mfc90enu.dll"
425 "${MSVC_MFCLOC_DIR}/mfc90esp.dll"
426 "${MSVC_MFCLOC_DIR}/mfc90deu.dll"
427 "${MSVC_MFCLOC_DIR}/mfc90fra.dll"
428 "${MSVC_MFCLOC_DIR}/mfc90ita.dll"
429 "${MSVC_MFCLOC_DIR}/mfc90jpn.dll"
430 "${MSVC_MFCLOC_DIR}/mfc90kor.dll"
434 set(_MFC_DLL_VERSION "")
435 set(_MFC_IDE_VERSION "")
436 if(MSVC_VERSION GREATER_EQUAL 2000)
437 # Version not yet supported.
438 elseif(MSVC_VERSION GREATER_EQUAL 1910)
439 set(_MFC_DLL_VERSION 140)
440 set(_MFC_IDE_VERSION 15)
441 elseif(MSVC_VERSION EQUAL 1900)
442 set(_MFC_DLL_VERSION 140)
443 set(_MFC_IDE_VERSION 14)
444 elseif(MSVC_VERSION EQUAL 1800)
445 set(_MFC_DLL_VERSION 120)
446 set(_MFC_IDE_VERSION 12)
447 elseif(MSVC_VERSION EQUAL 1700)
448 set(_MFC_DLL_VERSION 110)
449 set(_MFC_IDE_VERSION 11)
450 elseif(MSVC_VERSION EQUAL 1600)
451 set(_MFC_DLL_VERSION 100)
452 set(_MFC_IDE_VERSION 10)
456 set(v "${_MFC_DLL_VERSION}")
457 set(vs "${_MFC_IDE_VERSION}")
459 # Starting with VS 15 the MFC DLLs may be in a different directory.
460 if (NOT vs VERSION_LESS 15)
461 file(GLOB _MSVC_REDIST_DIRS "${MSVC_REDIST_DIR}/../*")
462 find_path(MSVC_REDIST_MFC_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFC
463 PATHS ${_MSVC_REDIST_DIRS} NO_DEFAULT_PATH)
464 mark_as_advanced(MSVC_REDIST_MFC_DIR)
465 unset(_MSVC_REDIST_DIRS)
467 set(MSVC_REDIST_MFC_DIR "${MSVC_REDIST_DIR}")
470 # Multi-Byte Character Set versions of MFC are available as optional
471 # addon since Visual Studio 12. So for version 12 or higher, check
472 # whether they are available and exclude them if they are not.
474 if(CMAKE_INSTALL_DEBUG_LIBRARIES)
476 "${MSVC_REDIST_MFC_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.DebugMFC")
477 set(__install__libs ${__install__libs}
478 "${MSVC_MFC_DIR}/mfc${v}ud.dll"
479 "${MSVC_MFC_DIR}/mfcm${v}ud.dll"
481 if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}d.dll")
482 set(__install__libs ${__install__libs}
483 "${MSVC_MFC_DIR}/mfc${v}d.dll"
486 if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfcm${v}d.dll")
487 set(__install__libs ${__install__libs}
488 "${MSVC_MFC_DIR}/mfcm${v}d.dll"
493 set(MSVC_MFC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFC")
494 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
495 set(__install__libs ${__install__libs}
496 "${MSVC_MFC_DIR}/mfc${v}u.dll"
497 "${MSVC_MFC_DIR}/mfcm${v}u.dll"
499 if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}.dll")
500 set(__install__libs ${__install__libs}
501 "${MSVC_MFC_DIR}/mfc${v}.dll"
504 if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfcm${v}.dll")
505 set(__install__libs ${__install__libs}
506 "${MSVC_MFC_DIR}/mfcm${v}.dll"
511 # include the language dll's as well as the actuall dll's
512 set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFCLOC")
513 set(__install__libs ${__install__libs}
514 "${MSVC_MFCLOC_DIR}/mfc${v}chs.dll"
515 "${MSVC_MFCLOC_DIR}/mfc${v}cht.dll"
516 "${MSVC_MFCLOC_DIR}/mfc${v}deu.dll"
517 "${MSVC_MFCLOC_DIR}/mfc${v}enu.dll"
518 "${MSVC_MFCLOC_DIR}/mfc${v}esn.dll"
519 "${MSVC_MFCLOC_DIR}/mfc${v}fra.dll"
520 "${MSVC_MFCLOC_DIR}/mfc${v}ita.dll"
521 "${MSVC_MFCLOC_DIR}/mfc${v}jpn.dll"
522 "${MSVC_MFCLOC_DIR}/mfc${v}kor.dll"
523 "${MSVC_MFCLOC_DIR}/mfc${v}rus.dll"
528 # MSVC 8 was the first version with OpenMP
529 # Furthermore, there is no debug version of this
530 if(CMAKE_INSTALL_OPENMP_LIBRARIES AND _IRSL_HAVE_MSVC)
531 set(_MSOMP_DLL_VERSION "")
532 set(_MSOMP_IDE_VERSION "")
533 if(MSVC_VERSION GREATER_EQUAL 2000)
534 # Version not yet supported.
535 elseif(MSVC_VERSION GREATER_EQUAL 1910)
536 set(_MSOMP_DLL_VERSION 140)
537 set(_MSOMP_IDE_VERSION 15)
538 elseif(MSVC_VERSION EQUAL 1900)
539 set(_MSOMP_DLL_VERSION 140)
540 set(_MSOMP_IDE_VERSION 14)
541 elseif(MSVC_VERSION EQUAL 1800)
542 set(_MSOMP_DLL_VERSION 120)
543 set(_MSOMP_IDE_VERSION 12)
544 elseif(MSVC_VERSION EQUAL 1700)
545 set(_MSOMP_DLL_VERSION 110)
546 set(_MSOMP_IDE_VERSION 11)
547 elseif(MSVC_VERSION EQUAL 1600)
548 set(_MSOMP_DLL_VERSION 100)
549 set(_MSOMP_IDE_VERSION 10)
550 elseif(MSVC_VERSION EQUAL 1500)
551 set(_MSOMP_DLL_VERSION 90)
552 set(_MSOMP_IDE_VERSION 9)
553 elseif(MSVC_VERSION EQUAL 1400)
554 set(_MSOMP_DLL_VERSION 80)
555 set(_MSOMP_IDE_VERSION 8)
558 if(_MSOMP_DLL_VERSION)
559 set(v "${_MSOMP_DLL_VERSION}")
560 set(vs "${_MSOMP_IDE_VERSION}")
561 set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.OPENMP")
563 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
564 set(__install__libs ${__install__libs}
565 "${MSVC_OPENMP_DIR}/vcomp${v}.dll")
574 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
575 ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
577 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
578 message(WARNING "system runtime library file does not exist: '${lib}'")
579 # This warning indicates an incomplete Visual Studio installation
580 # or a bug somewhere above here in this file.
581 # If you would like to avoid this warning, fix the real problem, or
582 # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
590 unset(__install_libs)
591 if(CMAKE_INSTALL_OPENMP_LIBRARIES)
593 list(APPEND __install_libs "${_Intel_redistdir}/libiomp5md.dll" "${_Intel_redistdir}/libiompstubs5md.dll")
595 list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.dylib" "${_Intel_redistdir}/libiompstubs5.dylib")
597 list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.so" "${_Intel_redistdir}/libiompstubs5.so")
598 if(_Intel_compiler_ver VERSION_LESS 17)
599 list(APPEND __install_libs "${_Intel_redistdir}/libomp_db.so")
601 if(_Intel_compiler_ver VERSION_LESS 13)
602 list(APPEND __install_libs "${_Intel_redistdir}/libiompprof5.so")
607 set(__install_dirs "${_Intel_redistdir}/1033")
608 if(EXISTS "${_Intel_redistdir}/1041")
609 list(APPEND __install_dirs "${_Intel_redistdir}/1041")
611 if(_Intel_compiler_ver VERSION_LESS 18)
612 list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c")
614 foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libioffload_host.dll libirngmd.dll
615 libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll)
617 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
619 if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
620 list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.dll")
622 if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
623 foreach(__Intel_lib IN ITEMS ifdlg100.dll libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll)
625 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
629 foreach(__Intel_lib IN ITEMS libchkp.dylib libcilkrts.5.dylib libcilkrts.dylib libimf.dylib libintlc.dylib libirc.dylib libirng.dylib libsvml.dylib)
630 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
632 if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
633 if(_Intel_compiler_ver VERSION_LESS 17)
634 list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.dylib")
637 if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
638 foreach(__Intel_lib IN ITEMS libifcore.dylib libifcoremt.dylib libifport.dylib libifportmt.dylib)
640 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
644 foreach(__Intel_lib IN ITEMS libchkp.so libcilkrts.so libcilkrts.so.5 libimf.so libintlc.so libintlc.so.5 libirc.so libpdbx.so libpdbx.so.5 libsvml.so)
646 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
648 if(_Intel_compiler_ver VERSION_GREATER_EQUAL 13)
649 foreach(__Intel_lib IN ITEMS libirng.so liboffload.so liboffload.so.5)
651 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
654 if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
655 set(__install_dirs "${_Intel_redistdir}/irml")
656 list(APPEND __install_libs "${_Intel_redistdir}/cilk_db.so")
657 if(_Intel_compiler_ver VERSION_GREATER_EQUAL 15)
658 list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.so" "${_Intel_redistdir}/libgfxoffload.so")
661 if(_Intel_compiler_ver VERSION_GREATER_EQUAL 16)
662 foreach(__Intel_lib IN ITEMS libioffload_host.so libioffload_host.so.5 libioffload_target.so libioffload_target.so.5 libmpx.so offload_main)
664 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
667 if(_Intel_compiler_ver VERSION_LESS 15)
668 foreach(__Intel_lib IN ITEMS libcxaguard.so libcxaguard.so.5)
670 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
673 if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
674 foreach(__Intel_lib IN ITEMS libicaf.so libifcore.so libifcore.so.5 libifcoremt.so libifcoremt.so.5 libifport.so libifport.so.5)
676 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
681 foreach(lib IN LISTS __install_libs)
683 list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
685 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
686 message(WARNING "system runtime library file does not exist: '${lib}'")
691 foreach(dir IN LISTS __install_dirs)
693 list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES ${dir})
695 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
696 message(WARNING "system runtime library file does not exist: '${dir}'")
703 get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH )
704 if(CMAKE_C_COMPILER_VERSION)
705 set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
707 set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
709 string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}")
710 list(GET _watcom_version_list 0 _watcom_major)
711 list(GET _watcom_version_list 1 _watcom_minor)
713 ${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll
714 ${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll
715 ${CompilerPath}/plbr${_watcom_major}${_watcom_minor}.dll )
720 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
721 ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
723 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
724 message(WARNING "system runtime library file does not exist: '${lib}'")
725 # This warning indicates an incomplete Watcom installation
726 # or a bug somewhere above here in this file.
727 # If you would like to avoid this warning, fix the real problem, or
728 # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
736 # Include system runtime libraries in the installation if any are
737 # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
738 if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
739 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
740 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
742 set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin)
744 set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
747 if(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT)
748 set(_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT
749 COMPONENT ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT})
751 install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
752 DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
753 ${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}
756 install(DIRECTORY ${CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES}
757 DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
758 ${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}