[CMake] Linking my lib to a static lib
Eric Noulard
eric.noulard at gmail.com
Mon Nov 3 09:39:15 EST 2008
2008/11/3 Daniel Blankensteiner <db at trunet.dk>:
> Hi all
>
> I have read most of the "Mastering Cmake" book and googled, but I couldn't
> find an answer, so I hope someone here can help me.
>
> I'm building a lib and want to include other static libs, so that it's all
> in one file, but I currently have two problems.
>
> 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?
> 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)
> 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.
Are channel.hpp IP.hpp headers or not?
--
Erk
More information about the CMake
mailing list