MantisBT - CMake
View Issue Details
0013951CMakeCMakepublic2013-02-25 09:412016-06-10 14:31
ITF-EDV Fröschl GmbH 
Kitware Robot 
normalminoralways
closedmoved 
x86Microsoft Windows XP (SP3)5.1
CMake 2.8.10.2 
 
0013951: InstallRequiredSystemLibraries.cmake can not find x64 in redist folder.
InstallRequiredSystemLibraries.cmake is checking

43: if(MSVC_VERSION GREATER 1599)
       # VS 10 and later:
       set(CMAKE_MSVC_ARCH x64)
       message(STATUS "MSVC_VERSION : ${MSVC_VERSION}") # Simple print out!
       ...

But the simple message(STATUS "MSVC_VERSION : ${MSVC_VERSION}") print shows:
-- MSVC_VERSION : 2008. The variable content is not 1599!

Changing 1599 to 2008 would work for both, win32 (x86) or win64 (amd64) and
the system related *.dlls will be copied as expected!
1. Include this lines in your Master CMakeLists.txt:
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION bin COMPONENT thirdparty)

2. Create solution with "%ProgramFiles%\CMake 2.8\bin\cmake" %OUR_SRC_ROOT% -G "Visual Studio 9 2008 Win64"
In our case we execute "%ProgramFiles%\CMake 2.8\bin\cmake" %OUR_SRC_ROOT% -G "Visual Studio 9 2008 Win64" from within a batch file.

-- Create the intermediate folder F:\projects\itfedv\itfedv\batch\script\windows\..\..\..\..\intermediate\vs9\win64
-- Change into F:\projects\itfedv\itfedv\batch\script\windows\..\..\..\..\intermediate\vs9\win64
 ...
-- Creating VisualStudio 9 (2008) Win64
-- The C compiler identification is MSVC 15.0.30729.1
-- The CXX compiler identification is MSVC 15.0.30729.1
-- Check for working C compiler using: Visual Studio 9 2008 Win64
-- Check for working C compiler using: Visual Studio 9 2008 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 9 2008 Win64
-- Check for working CXX compiler using: Visual Studio 9 2008 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - not found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
 ...
CMake Warning at C:/Programme/CMake 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:345 (message):
  system runtime library file does not exist:
  'MSVC90_REDIST_DIR-NOTFOUND/x64/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest'
Call Stack (most recent call first):
  cmake/MyNSIS.cmake:9 (include)
  CMakeLists.txt:157 (include)

CMake Warning at C:/Programme/CMake 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:345 (message):
  system runtime library file does not exist:
  'MSVC90_REDIST_DIR-NOTFOUND/x64/Microsoft.VC90.CRT/msvcm90.dll'
Call Stack (most recent call first):
  cmake/MyNSIS.cmake:9 (include)
  CMakeLists.txt:157 (include)

CMake Warning at C:/Programme/CMake 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:345 (message):
  system runtime library file does not exist:
  'MSVC90_REDIST_DIR-NOTFOUND/x64/Microsoft.VC90.CRT/msvcp90.dll'
Call Stack (most recent call first):
  cmake/MyNSIS.cmake:9 (include)
  CMakeLists.txt:157 (include)

CMake Warning at C:/Programme/CMake 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:345 (message):
  system runtime library file does not exist:
  'MSVC90_REDIST_DIR-NOTFOUND/x64/Microsoft.VC90.CRT/msvcr90.dll'
Call Stack (most recent call first):
  cmake/MyNSIS.cmake:9 (include)
  CMakeLists.txt:157 (include)
No tags attached.
Issue History
2013-02-25 09:41ITF-EDV Fröschl GmbHNew Issue
2014-03-18 11:00sigmaNote Added: 0035429
2016-06-10 14:28Kitware RobotNote Added: 0042237
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035429)
sigma   
2014-03-18 11:00   
On Win7 x64 all checks in InstallRequiredSystemLibraries.cmake fail. My visual studio is installed in a non-default location. So I added a path that uses the environment variable VSINSTALLDIR to the find_path functions:

find_path(MSVC${v}_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
      PATHS
        "${msvc_install_dir}/../../VC/redist"
        "${base_dir}/VC/redist"
        "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist"
        "$ENV{ProgramFiles(x86)}/Microsoft Visual Studio ${v}.0/VC/redist"
    "$ENV{VSINSTALLDIR}/VC/redist"
)


it works just fine now. Note that the VSINSTALLDIR is set by the VS installer of 2012 and other versions and that I use a command prompt and NMake Makefiles. I don't know the behavior of other generators.
(0042237)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.