[CMake] Packaging on Windows with VS2008 and ZIP - Runtime Libraries Inclusion

Michael Jackson mike.jackson at bluequartz.net
Wed Jan 5 14:42:16 EST 2011


On Jan 5, 2011, at 2:36 PM, David Partyka wrote:

> FYI, I just merged removal of setting CMAKE_INSTALL_DEBUG_LIBRARIES from ParaView.
> 
> On Wed, Jan 5, 2011 at 2:24 PM, Michael Jackson <mike.jackson at bluequartz.net> wrote:
>> That is where I pulled the code from so I must have grabbed that version. But I think I am misunderstanding what should be used when with respect to BundleUtilities and INSTALL when on MSVC.
>> 
>>  From the looks of it, if I am "installing" on my local machine then by definition I have all the needed runtime libraries in all the right places because I have installed Visual Studio which means placing copies of them in my installation location is probably NOT really needed. Right? Wrong?
> 
> Right, infact, if you run your app and look at process explorer I am pretty sure you'll see it loaded msvcr9<blahblah>.dll from C:\Windows\winsxs\blah and not from the runtimes you have sitting right next to your executable.

Yes. Checking this you are right. So I have pulled all the code where I was installing the system libraries (on MSVC) and ran the "INSTALL" project. Now I only get the executables plus my own dependent libraries in the CMAKE_INSTALL_PREFIX and they all execute without any problems.

> 
>>  Package/Installer Generation: This is meant to be served/given to others so the runtime libraries ARE needed, and NOT the Debug libraries (at least not officially) which means I should be using which CMake mechanism to make sure my installer is built correctly. Most of the time I am creating simple Zip installers as some of my clients can not run actual installers on their machines. Is there a tutorial some where? At this point I'll write one if someone can set me straight. Tired of spinning my wheels.
> 
> I use clean VMs with nothing installed to test ParaView binaries. This is particularly good at showing you when you somehow didn't include the msvc runtime dlls.

Right. I do that. But how do you ONLY include the runtime libraries when you are generating an installer package? I would need to have some CMake code that calls include(InstallRequiredSystemLibraries) BUT have it called from CPack code? Is that correct? 

Mike J.


>  
> 
> --
> Mike Jackson <www.bluequartz.net>
> 
> On Jan 5, 2011, at 2:09 PM, David Partyka wrote:
> 
> > This might be my fault If you're building a paraview app. I had SET (CMAKE_INSTALL_DEBUG_LIBRARIES ON) from a month ago that I didn't remove. I'll do that right now.
> >
> > On Wed, Jan 5, 2011 at 1:54 PM, Michael Jackson <mike.jackson at bluequartz.net> wrote:
> > OK.So how do I NOT package them? So far they _are_ getting put into the installer even if I set Visual Studio to "Release". I have this at the top of my CMake code that sets up CPack:
> >
> > if (MSVC)
> > SET (CMAKE_INSTALL_DEBUG_LIBRARIES OFF)
> > INCLUDE (InstallRequiredSystemLibraries)
> > endif()
> >
> > ___________________________________________________________
> > Mike Jackson                      www.bluequartz.net
> > Principal Software Engineer       mike.jackson at bluequartz.net
> > BlueQuartz Software               Dayton, Ohio
> >
> > On Jan 5, 2011, at 1:31 PM, David Cole wrote:
> >
> > > Just as an FYI:
> > >
> > > The Debug libraries for MSVC are not redistributable components. Do
> > > not build them into an installer. People who need to use them are
> > > required to have a corresponding Visual Studio installation on their
> > > machine.
> > >
> > > We provide access to those for INSTALL simply for testing the make
> > > install tree of a debug build, possibly even copying it over to
> > > another machine for testing.
> > >
> > > But it is not intended that the MSVC Debug libraries be packaged...
> > >
> > >
> > > On Wed, Jan 5, 2011 at 1:20 PM, Michael Jackson
> > > <mike.jackson at bluequartz.net> wrote:
> > >> I am working on my CPack code for my project. What I have noticed is that the MSVC runtime libs for both Debug and Release are included when I do an INSTALL and are NOT included when I try to run the PACKAGE project. Again, this is probably something simple to solve but I just am not sure what all I should be using from CMake or creating on my own.
> > >>
> > >> Any pointers? I'll start wading through both the CMake projects and the ParaView projects and see what if those yield any clues.
> > >> ___________________________________________________________
> > >> Mike Jackson                      www.bluequartz.net
> > >> Principal Software Engineer       mike.jackson at bluequartz.net
> > >> BlueQuartz Software               Dayton, Ohio



More information about the CMake mailing list