[CMake] system dependent unsaturated dependencies
Alexander Neundorf
a.neundorf-work at gmx.net
Fri Dec 14 14:57:12 EST 2012
On Friday 14 December 2012, Witold E Wolski wrote:
> Hi,
>
> Just run into a problem trying to build a project using cmake on a special
> linux distribution:
> My project depends on cppunit. I find the cppunit lib using find_library
> and the project builds nicely on my machine.
> However, on a different machine with a different linux distribution I run
> into a problem of unsaturated dependenices of the cppunit lib.
>
> /cluster/apps/cppunit/1.12.1/lib/libcppunit.so: undefined reference to
> `dlsym'
>
> doing some research on the web I figured out the I have to link against
> libdl too.
> How do I add this dependency transparently to the cmake file?
You have to do this in your FindCPPUnit.cmake file, and add libdl.so to your
CPPUNIT_LIBRARIES variable (which you probably have).
Alex
More information about the CMake
mailing list