[CMake] Linking my lib to a static lib
Daniel Blankensteiner
db at trunet.dk
Mon Nov 3 09:45:04 EST 2008
On Mon, 3 Nov 2008 15:39:15 +0100, "Eric Noulard" <eric.noulard at gmail.com>
wrote:
>> 1. The dependencies to the static libs are not included in my
> VS-solution file.
>
> I do not understand that question without an example,
> do you mean that your lib is not rebuilt when "vendord.lib" is changed?
No, vendord.lib is not mentioned in the solution file.
>> 2. When I build my lib I get no output (no static or shared lib is
>> created).
>
> It looks like your lib does not contains any compiled source files but
> only headers
> (.hpp)
That is correct. Most of mylib is typedefs and the classes I have are small
and either templates or inlined functions.
>> set (SRC_FILES
>> mylib/channel.hpp
>> mylib/net/IP.hpp
>> )
>
> So CMake has nothing to compile thus nothing to build.
> Try add at one "to-be-compiled" file to your lib.
It should compile my header files, I have no .cpp files.
> Are channel.hpp IP.hpp headers or not?
Yes they are, but they also contain the implementations.
Best regards
db
More information about the CMake
mailing list