[CMake] unsetting CXX_SHARED_LINKER_FLAGS for one library in a project?
Hendrik Sattler
post at hendrik-sattler.de
Fri Dec 25 02:35:43 EST 2009
Am Mittwoch 23 Dezember 2009 18:22:42 schrieb Boudewijn Rempt:
> Hi,
>
> I am integrating an external library in the build process of a KDE
> application. KDE's findkde4 cmake module adds --fatal-
> warnings -Wl,--no-undefined to the linker flags. This library (wv2) links
> to glib2, and when I try to link it with these flags set, I get lots of
> errors like:
>
> CMakeFiles/wv2.dir/olestream.cpp.o: In function `~OLEStreamReader':
> /home/boud/kde/src/koffice/filters/kword/wv2/src/olestream.cpp:76:
> undefined reference to `g_type_check_instance_cast
>
> If I make the (old) standalone version of wv2, and add the linker flags,
> linking fails as well. Apparently the library works well even though at
> linking time there are undefined references, so I am trying to unset the
> linker flags for this library only.
>
> Is that possible? Or is there a better solution?
Yes, add the missing libraries to the link line: gobject-2.0
HS
More information about the CMake
mailing list