[CMake] Static Modules
Markus Raab
usenet at markus-raab.org
Tue Mar 9 17:16:44 EST 2010
Hi list!
I am currently trying to migrate a autotools project to cmake.
The project used modules intensively. It was possible to compile all these
modules also statically and link them together to a single static library.
Is this supported out of the box by cmake? How?
This was realized by exporting all symbols with following shell code:
for lib in "$@"
do
if [ -r $lib ]; then
echo "Get objects files for $lib ..."
@AR@ t $lib | @AWK@ -v "dir=`dirname $lib`" '/^[^_]/ {printf "%s/%s ",
dir,$0}' >> objects
else
echo "SKIPED: $lib doesn't exist."
fi
done
echo "" >> objects
and then add it to the library with:
libelektra_a_LIBADD = `cat objects`
Step 1 could stay as is (even thouch a solution not requiring a shell and ar
program would be prefered), but how to add specific symbols to a static
library using cmake?
best regards
Markus
--
http://www.markus-raab.org | Sei nicht ungeduldig, wenn man deine
-o) | Argumente nicht gelten läßt. -- Goethe,
Kernel 2.6.24-1-a /\ | Maximen und Reflexionen
on a x86_64 _\_v |
More information about the CMake
mailing list