[CMake] Can't get static executable

Eneko Nieto eneko at bluexare.org
Fri Jan 11 06:22:33 EST 2008


Hi,

I wanted to compile Gammu for getting a static executable but I didn't 
achieve. I asked in the Gammu mailing list but the actual maintainer answered 
he didn't know how to configure CMake for compiling statically. More info in 
the original mail.

Could anyone help me?

Thanks in advance

Eneko

On Friday 11 January 2008 10:20:59 Michal Čihař wrote:
> Hi
>
> On Fri, 11 Jan 2008 09:54:40 +0100
>
> Eneko Nieto <eneko at bluexare.org> wrote:
> > Now, my problem. I want to get a static gammu executable for using it in
> > systems with no libc, bluez and no other dependencies. I tried it with
> > normal compile (./configure;make) and with CMake (mkdir build;cd
> > build;cmake ..;ccmake ..) setting CMAKE_EXE_LINKER_FLAGS to -static.
> >
> > Sadly my result is always the same:
> > $ file ./gammu/gammu
> > ./gammu/gammu: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> > for GNU/Linux 2.6.0, dynamically linked (uses shared libs), not stripped
> >
> > Could anyone help me?
>
> I have no idea how to force CMake to linking external libraries as
> static as FIND_LIBRARY seems to prefer .so in all cases. Try asking on
> CMake mailing list.


More information about the CMake mailing list