[CMake] Packaging for Win32 system

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed May 28 16:56:27 EDT 2008


On Wed, May 28, 2008 at 10:38 AM, Mathieu Malaterre
<mathieu.malaterre at gmail.com> wrote:
> Hi,
>
>  Summary: I am trying to make binary package of gdcm for Win32 system.
>
> Issue #1.
>  In the past I was using the Free VCToolkit 2003 to package
> everything; It was nice and easy since cmake by default uses /MT to
> compile stuff (ie. no dll to redistribute).
>  Unfortunately for me, /MT flag is actually very tricky to use when
> you try to compile an exe that link to shared lib (dll).
>
>  Since I am generating a python module (*.pyd) which is required to
> be 'dll', I was wondering if I could compile the entire project using
> static libs, and only the python module would be a shared lib.
>  Is it possible to create a shared lib that link to static lib on
> win32 system ?

Seems like compiling VTK in static + /MT flags, then compiling GDCM in
static + /MT (well except the python module which is explicitely
marked as shared) is working after all.

For more info about why you should not mix /MT and shared libs, see:
Ref:
http://groups.google.com/group/microsoft.public.vc.mfc/msg/529dcb0938836afd

-- 
Mathieu


More information about the CMake mailing list