[ITK-users] Link ITK libraries statically
Gib Bogle
g.bogle at auckland.ac.nz
Wed May 20 16:42:24 EDT 2015
Hi Brad,
Maybe it does, but not the way I'm doing it. I am building with Qt Creator. In CMakeLists.txt I have:
OPTION(BUILD_SHARED_LIBS "Build package with shared libraries." OFF)
and in CMakeCache.txt I see:
BUILD_SHARED_LIBS:BOOL=OFF
but the executable is still built using all shared libraries.
I also set
OPTION(CMAKE_EXE_LINKER_FLAGS "-static")
but this seems to have no effect as well.
Is this something to do with Qt Creator, which under the hood uses qmake?
Thanks
Gib
________________________________
From: Bradley Lowekamp [blowekamp at mail.nih.gov]
Sent: Thursday, 21 May 2015 1:38 a.m.
To: Gib Bogle
Cc: insight-users at itk.org
Subject: Re: [ITK-users] Link ITK libraries statically
Hello,
Does the CMake variable BUILD_SHARED_LIBS meet your needs?
Brad
On May 20, 2015, at 12:49 AM, Gib Bogle <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>> wrote:
I am using cmake and VS2010 to build an ITK application on Windows (also using Qt, but that is not relevant I think). I want to give the executable to a colleague, but I'd rather not have to transfer the 16 ITK DLLs as well. Is there a way to build my application so that the ITK libraries are linked statically?
A related question: I am using ITK in this program only to read and write tiff images. Is there a way to limit the libraries that are linked to just those that are needed?
Thanks
Gib
_____________________________________
Powered by www.kitware.com<http://www.kitware.com/>
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150520/27e1a1c2/attachment.html>
More information about the Insight-users
mailing list