[CMake] cpack problems.
Axel Roebel
Axel.Roebel at ircam.fr
Mon May 15 12:33:14 EDT 2006
On Wednesday 10 May 2006 20:33, you wrote:
> Axel Roebel wrote:
> > I just tried the cpack program. It failed when executing
> > a post_install_script which is configured to access the installed
> > libraries and to rename them. Unfortunately this seems to be required if
> > one wants to install a static and a shared library of the same name.
>
> In CMake 2.4 you can easily create a static and shared library with the
> same name. They just have to have different logical target names:
>
> ADD_LIBRARY(foo SHARED ...)
> ADD_LIBRARY(foo-static STATIC ...)
> SET_TARGET_PROPERTIES(foo-static PROPERTIES OUTPUT_NAME foo)
>
> Be careful when doing this on Windows though because the shared library
> will create a foo.lib export library which has the exact same name as
> the foo.lib static library. CMake makes no attempt to diagnose or
> resolve this conflict, so it is up to the user to be sure they are
> always in different directories.
Thanks Brad,
so it is just not portable to have a static and a shared library.
Too bad, on unix we do this all the time.
However, I would like to come back to my main questions
related to the cpack command. Does anybody know
1.) how to prevent cpack from creating a binary distribution
and to have it create a source distribution, only.
2.) how to achieve the proper CMAKE_INSTALL_PREFIX
for cpack binary packages containing post install scripts.
It seems to me that there is a bug in the cpack handling,
so I may better file a bug report.
Axel
--
Axel Roebel
IRCAM Analysis/Synthesis Team
More information about the CMake
mailing list