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"
484 "${MSVC_MFC_DIR}/mfcm${v}d.dll"
489 set(MSVC_MFC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFC")
490 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
491 set(__install__libs ${__install__libs}
492 "${MSVC_MFC_DIR}/mfc${v}u.dll"
493 "${MSVC_MFC_DIR}/mfcm${v}u.dll"
495 if("${v}" LESS 12 OR EXISTS "${MSVC_MFC_DIR}/mfc${v}.dll")
496 set(__install__libs ${__install__libs}
497 "${MSVC_MFC_DIR}/mfc${v}.dll"
498 "${MSVC_MFC_DIR}/mfcm${v}.dll"
503 # include the language dll's as well as the actuall dll's
504 set(MSVC_MFCLOC_DIR "${MSVC_REDIST_MFC_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.MFCLOC")
505 set(__install__libs ${__install__libs}
506 "${MSVC_MFCLOC_DIR}/mfc${v}chs.dll"
507 "${MSVC_MFCLOC_DIR}/mfc${v}cht.dll"
508 "${MSVC_MFCLOC_DIR}/mfc${v}deu.dll"
509 "${MSVC_MFCLOC_DIR}/mfc${v}enu.dll"
510 "${MSVC_MFCLOC_DIR}/mfc${v}esn.dll"
511 "${MSVC_MFCLOC_DIR}/mfc${v}fra.dll"
512 "${MSVC_MFCLOC_DIR}/mfc${v}ita.dll"
513 "${MSVC_MFCLOC_DIR}/mfc${v}jpn.dll"
514 "${MSVC_MFCLOC_DIR}/mfc${v}kor.dll"
515 "${MSVC_MFCLOC_DIR}/mfc${v}rus.dll"
520 # MSVC 8 was the first version with OpenMP
521 # Furthermore, there is no debug version of this
522 if(CMAKE_INSTALL_OPENMP_LIBRARIES AND _IRSL_HAVE_MSVC)
523 set(_MSOMP_DLL_VERSION "")
524 set(_MSOMP_IDE_VERSION "")
525 if(MSVC_VERSION GREATER_EQUAL 2000)
526 # Version not yet supported.
527 elseif(MSVC_VERSION GREATER_EQUAL 1910)
528 set(_MSOMP_DLL_VERSION 140)
529 set(_MSOMP_IDE_VERSION 15)
530 elseif(MSVC_VERSION EQUAL 1900)
531 set(_MSOMP_DLL_VERSION 140)
532 set(_MSOMP_IDE_VERSION 14)
533 elseif(MSVC_VERSION EQUAL 1800)
534 set(_MSOMP_DLL_VERSION 120)
535 set(_MSOMP_IDE_VERSION 12)
536 elseif(MSVC_VERSION EQUAL 1700)
537 set(_MSOMP_DLL_VERSION 110)
538 set(_MSOMP_IDE_VERSION 11)
539 elseif(MSVC_VERSION EQUAL 1600)
540 set(_MSOMP_DLL_VERSION 100)
541 set(_MSOMP_IDE_VERSION 10)
542 elseif(MSVC_VERSION EQUAL 1500)
543 set(_MSOMP_DLL_VERSION 90)
544 set(_MSOMP_IDE_VERSION 9)
545 elseif(MSVC_VERSION EQUAL 1400)
546 set(_MSOMP_DLL_VERSION 80)
547 set(_MSOMP_IDE_VERSION 8)
550 if(_MSOMP_DLL_VERSION)
551 set(v "${_MSOMP_DLL_VERSION}")
552 set(vs "${_MSOMP_IDE_VERSION}")
553 set(MSVC_OPENMP_DIR "${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.${MSVC_REDIST_NAME}.OPENMP")
555 if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
556 set(__install__libs ${__install__libs}
557 "${MSVC_OPENMP_DIR}/vcomp${v}.dll")
566 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
567 ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
569 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
570 message(WARNING "system runtime library file does not exist: '${lib}'")
571 # This warning indicates an incomplete Visual Studio installation
572 # or a bug somewhere above here in this file.
573 # If you would like to avoid this warning, fix the real problem, or
574 # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
582 unset(__install_libs)
583 if(CMAKE_INSTALL_OPENMP_LIBRARIES)
585 list(APPEND __install_libs "${_Intel_redistdir}/libiomp5md.dll" "${_Intel_redistdir}/libiompstubs5md.dll")
587 list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.dylib" "${_Intel_redistdir}/libiompstubs5.dylib")
589 list(APPEND __install_libs "${_Intel_redistdir}/libiomp5.so" "${_Intel_redistdir}/libiompstubs5.so")
590 if(_Intel_compiler_ver VERSION_LESS 17)
591 list(APPEND __install_libs "${_Intel_redistdir}/libomp_db.so")
593 if(_Intel_compiler_ver VERSION_LESS 13)
594 list(APPEND __install_libs "${_Intel_redistdir}/libiompprof5.so")
599 set(__install_dirs "${_Intel_redistdir}/1033")
600 if(EXISTS "${_Intel_redistdir}/1041")
601 list(APPEND __install_dirs "${_Intel_redistdir}/1041")
603 if(_Intel_compiler_ver VERSION_LESS 18)
604 list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c")
606 foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libioffload_host.dll libirngmd.dll
607 libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll)
609 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
611 if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
612 list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.dll")
614 if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
615 foreach(__Intel_lib IN ITEMS ifdlg100.dll libicaf.dll libifcoremd.dll libifcoremdd.dll libifcorert.dll libifcorertd.dll libifportmd.dll)
617 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
621 foreach(__Intel_lib IN ITEMS libchkp.dylib libcilkrts.5.dylib libcilkrts.dylib libimf.dylib libintlc.dylib libirc.dylib libirng.dylib libsvml.dylib)
622 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
624 if(_Intel_compiler_ver VERSION_LESS 17)
625 list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.dylib")
627 if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
628 foreach(__Intel_lib IN ITEMS libifcore.dylib libifcoremt.dylib libifport.dylib libifportmt.dylib)
630 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
634 set(__install_dirs "${_Intel_redistdir}/irml")
635 foreach(__Intel_lib IN ITEMS cilk_db.so libchkp.so libcilkrts.so libcilkrts.so.5 libimf.so libintlc.so libintlc.so.5 libirc.so libpdbx.so libpdbx.so.5 libsvml.so)
637 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
639 if(_Intel_compiler_ver VERSION_GREATER_EQUAL 13)
640 foreach(__Intel_lib IN ITEMS libirng.so liboffload.so liboffload.so.5)
642 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
645 if(_Intel_compiler_ver VERSION_GREATER_EQUAL 15)
646 list(APPEND __install_libs "${_Intel_redistdir}/libistrconv.so")
647 if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_CXX_COMPILER_ID STREQUAL Intel)
648 list(APPEND __install_libs "${_Intel_redistdir}/libgfxoffload.so")
651 if(_Intel_compiler_ver VERSION_GREATER_EQUAL 16)
652 foreach(__Intel_lib IN ITEMS libioffload_host.so libioffload_host.so.5 libioffload_target.so libioffload_target.so.5 libmpx.so offload_main)
654 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
657 if(_Intel_compiler_ver VERSION_LESS 15)
658 foreach(__Intel_lib IN ITEMS libcxaguard.so libcxaguard.so.5)
660 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
663 if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
664 foreach(__Intel_lib IN ITEMS libicaf.so libifcore.so libifcore.so.5 libifcoremt.so libifcoremt.so.5 libifport.so libifport.so.5)
666 list(APPEND __install_libs "${_Intel_redistdir}/${__Intel_lib}")
671 foreach(lib IN LISTS __install_libs)
673 list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
675 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
676 message(WARNING "system runtime library file does not exist: '${lib}'")
681 foreach(dir IN LISTS __install_dirs)
683 list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES ${dir})
685 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
686 message(WARNING "system runtime library file does not exist: '${dir}'")
693 get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH )
694 if(CMAKE_C_COMPILER_VERSION)
695 set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
697 set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
699 string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}")
700 list(GET _watcom_version_list 0 _watcom_major)
701 list(GET _watcom_version_list 1 _watcom_minor)
703 ${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll
704 ${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll
705 ${CompilerPath}/plbr${_watcom_major}${_watcom_minor}.dll )
710 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
711 ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
713 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
714 message(WARNING "system runtime library file does not exist: '${lib}'")
715 # This warning indicates an incomplete Watcom installation
716 # or a bug somewhere above here in this file.
717 # If you would like to avoid this warning, fix the real problem, or
718 # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
726 # Include system runtime libraries in the installation if any are
727 # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
728 if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
729 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
730 if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
732 set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin)
734 set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
737 if(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT)
738 set(_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT
739 COMPONENT ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT})
741 install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
742 DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
743 ${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}
746 install(DIRECTORY ${CMAKE_INSTALL_SYSTEM_RUNTIME_DIRECTORIES}
747 DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION}
748 ${_CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT}