[CMake] Cross compile + shared libs problem
Frederik Deweerdt
deweerdt at free.fr
Mon Mar 24 20:10:36 EDT 2008
Hi,
I'm trying to cross-compile static libraries for RTEMS. Our project's
also targets Linux, where we use shared libraries. We declare the
libraries with: add_library(libname srcs...). So STATIC or SHARED is
omitted.
On RTEMS there are no static libraries, so I was expecting that by
setting BUILD_SHARED_LIBS to OFF in the toolchain file, I would get
static libraries.
I do get static libraries for RTEMS, but cmake complains that:
ADD_LIBRARY for library tsp_services is used with the SHARED option, but the target platform supports only STATIC libraries. Building it STATIC instead. This may lead to problems.
Did I miss something, or is BUILD_SHARED_LIBS not working as expected?
I'm using today's cmake CVS.
Regards,
Frederik
More information about the CMake
mailing list