[CMake] cpack install problem
John Drescher
drescherjm at gmail.com
Thu Sep 3 14:54:21 EDT 2009
On Thu, Sep 3, 2009 at 2:13 PM, Dean Inglis<dean.inglis at camris.ca> wrote:
> Hi,
> I originally posted this thread to kwwidgets, but have
> not had much success and perhaps this is a cpack/cmake
> issue Im having.
>
>
> I¹m building stand alone applications using VTK, ITK, GDCM, KWWidgets and I
> I'm recently having problems getting my apps to run on windows (XP, Vista 32
> bit) platforms where the installer is generated by cpack (NSIS). The
> apps/toolkits tcl/tk are all statically built and linked in Release mode
> using MS Visual Studio Express 2005. I am compiling using the command line
> tools (nmake). I keep getting:
>
> The application has failed to start because its side-by-side
> configuration is incorrect. Please see the application event log for more
> detail.
>
> Installing vcredist_x86.exe does not help as was
> suggested on some MS forums. As an example, the installer installs
> C:\Program Files\MyApp\bin\myKWWidgetsApp.exe
> C:\Program Files\MyApp\bin\Microsoft.VC80.CRT.manifest
> C:\Program Files\MyApp\bin\ msvcm80.dll
> C:\Program Files\MyApp\bin\ msvcp80.dll
> C:\Program Files\MyApp\bin\ msvcr80.dll
>
BTW, I do not think you can just copy those msvc dlls anymore. I have
my CMakeLsts.txt package vcredist and install that automatically for
me:
So I have this in my CPack setup for my main project:
IF(CMAKE_CL_64)
SET(CMAKE_MSVC_ARCH amd64)
ELSE(CMAKE_CL_64)
SET(CMAKE_MSVC_ARCH x86)
ENDIF(CMAKE_CL_64)
IF(MSVC80)
FIND_PROGRAM(MSVC_REDIST NAMES
vcredist_${CMAKE_MSVC_ARCH}/vcredist_${CMAKE_MSVC_ARCH}.exe
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../SDK/v2.0/BootStrapper/Packages/"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../SDK/v2.0/BootStrapper/Packages/"
)
GET_FILENAME_COMPONENT(vcredist_name "${MSVC_REDIST}" NAME)
INSTALL(PROGRAMS ${MSVC_REDIST} COMPONENT Runtime DESTINATION bin)
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait
'\\\"$INSTDIR\\\\bin\\\\${vcredist_name}\\\"'")
ENDIF(MSVC80)
John
More information about the CMake
mailing list