[CMake] Why are my static libs not being read?

John Drescher drescherjm at gmail.com
Tue Jul 31 15:03:21 EDT 2012


On Tue, Jul 31, 2012 at 2:54 PM, Toronto Andrew
<andrew.louis93 at gmail.com> wrote:
> Thank you John, this did work. I get the idea now, thank you.
>
> I have another concern though, that I hope I can be helped with though it's
> doesn't fall under the original problem.
>
> So I am using a project within my project: http://i.imgur.com/bqqnp.png, and
> I found a custom
> https://qextserialport.googlegroups.com/attach/9b25d0e5e8974d99/CMakeLists.txt?view=1&part=4
> CMakeLists.txt  for it created by the developers, and I was wondering how
> would I go about integrating that into my existing CMakeLists.txt, any input
> regarding how to go about doing this will be greatly appreciated.
>
> Thank you guys once again!
>

One way is to put this file along with the sources in a subdirectory
of your project and use the add_subdirectory cmake command to add that
to your project. Then add qextserialport to your
TARGET_LINK_LIBRARIES. This time just use qextserialport since it is
not a variable but a target. You will also have to add a entry to your
include_directories for the location of the .h file in this
subdirectory.

John


More information about the CMake mailing list