1#
2# Find the Microsoft Visual C++ library DLLs.
3# These are included with the full frontal (Professional, Enterprise) editions
4# of Visual Studio but not Express.
5#
6#  MSVCR_DLL - Path to the redistributable DLLs.
7#
8
9set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
10include(InstallRequiredSystemLibraries)
11
12# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS will likely give us a list of DLL
13# paths containing spaces. We'll assume that they're all in the same
14# directory and use it to create something that's easier to pass to
15# NSIS.
16
17set(MSVCR_DLL)
18list(GET CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS 0 _msvcr_dll)
19if(_msvcr_dll)
20	get_filename_component(_msvcr_dir ${_msvcr_dll} DIRECTORY)
21	set(MSVCR_DLL "${_msvcr_dir}/*.*")
22	file(TO_NATIVE_PATH "${MSVCR_DLL}" MSVCR_DLL)
23endif()
24