[CMake] Create executable with no dynamic dependency at all

Denis Scherbakov denis_scherbakov at yahoo.com
Thu May 7 05:29:22 EDT 2009


Jean-Pierre,

I set -static flag in the top level CMakeLists.txt:

SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
before ADD_SUBDIRECTORY.

I didn't find any error in your files, I would do the same with exception to -static flag.

Denis

> May I ask what platform you are using? I just tried the
> following simplest
> example on FreeBSD 6 and on Ubuntu 8.10. On both platforms
> I do not manage
> to get a non-dyanamic executable. How do I get the
> "-static" flag set?



      


More information about the CMake mailing list