My project makes use of the CMake/CPack module InstallRequiredSystemLibraries to package Microsoft Visual C Runtime libraries with other build artifacts. Despite this and despite the presence of appropriate-looking files showing up in the installed image, my project does not run on XP and Vista machines unless the user installs the vcredist package from Microsoft.
The VC runtime libraries provided by Microsoft and picked up by CMake/CPack have a manifest version of 9.0.30729.4148. I believe this version string refers to VS2008 SP1 + some hotfix. This seems reasonable since my Windows build machine is running VS2008 SP1 + some hotfix. However, all the binaries produced by the build system have the version sting 9.0.21022 embedded internally in a manifest. I am not the first to encounter this problem and there are a number of potential workarounds: http://stackoverflow.com/questions/59635/app-does-not-run-with-vs-2008-sp1-dlls-previous-version-works-with-rtm-versions/70808#70808 http://stackoverflow.com/questions/2682373/how-can-i-configure-visual-c-project-to-use-9-0-30729-runtime-version-instead-o http://connect.microsoft.com/VisualStudio/feedback/details/361682/vc9-sp1-generates-manifests-with-the-wrong-version-number Options I can see: 1. Hack Microsoft.VC90.CRT.manifest and change the version string from 9.0.30729.4148 to 9.0.21022. This seems to work but obviously it seems ugly and could easily have side effects. 2. #define _BIND_TO_CURRENT_VCLIBS_VERSION 1. This will work but it's invasive: it must be set for all projects, it must be set early enough that it's loaded before the Microsoft system header that defines the default for this value, it must be set for all 3rdpartylibs used by all projects. 3. Modify/hack/roll my own InstallRequiredSystemLibraries that grabs an older 9.0.21022 version of the MSVC redistributable libraries (perhaps from the WinSxS directory on my development system). My question is: how are others handling this with CMake/CPack? Anyone using one of the 3 approaches I outlined above? If so, pros/cons? If not, what else can I try? Thanks, tyler _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake