[CMake] find dynamic libs

Andreas Pakulat apaku at gmx.de
Thu Jul 12 13:28:34 EDT 2012


Hi,

On Thu, Jul 12, 2012 at 6:12 PM, Yixun Liu <yxliuwm at gmail.com> wrote:

> Hi,
> I am using FIND_PACKAGE(Qt4 REQUIRED) in the CMakeLists to find Qt libs.
> QT_LIBRARIES gives me QtGui, QtSql and QtCore, which are static libs.
>

How do you know that? Whats the actual content of the variable? Which
platform are you running on?


> How to force FIND_PACKAGE to find the dynamic libs: QtGui4, QtSql4 and
> QtCore4?
>

I think you're misinterpreting whats happening, QtCore is the name on *nix
platforms usually and QtCore4 is used only on Windows (and the name of the
frameworks on MacOSX). I doubt you have libraries with both names, one
being shared and one being static in the same directory and thats the only
way the wrong one would be preferred since FIND_LIBRARY only searches in
Qt's library-directory as reported by qmake.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120712/776bfdf1/attachment.htm>


More information about the CMake mailing list