开发者

Compile only specific library from Qt

I want to compile one of Qt's default libraries (QDeclarative) on OSX.

Which argument do I need to pass to ./configure to a开发者_运维百科chieve this?


http://doc.qt.nokia.com/4.7-snapshot/configure-options.html. it's more of a black list then a whitelist. For example, if you wanted to build it without webkit support, you would run:

./configure -no-webkit

Though it looks like most of the blacklist options are for windows only, you may be slightly out of luck :-/.


This is not a standalone component as far as I know it is dependent on QtXML and some other parts of QT within QtCore. Just compile QT for Mac using the cross platform options in the link Evan Teran posted here.

If you only want to link against QtCore add QT -= gui to your .pro file in QtCreator or otherwise specify removal of the default included QtGui in your linking command line.


For what it's worth, as of 09'15 and in case of Qt 5.5, excluding modules is described in the docs as the following:

./configure -skip qtconnectivity


On Windows anyway, if you are selective about which submodules you initialize and update, when you run configure, only those submodules will be built. This is a way to whitelisit only the modules you really need. I would hope this works just as well on the other OSs...

>> git clone git://code.qt.io/qt/qt5.git
>> cd qt5
>> git checkout 5.15
>> git submodule init qtbase
>> git submodule update qtbase
>> configure -nomake tests -nomake examples -opensource
>> nmake
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜