开发者

Copy Qt4's DLLs with CMake

I want to copy QtCore4.dll and QtGui4.dll in my Install/ dir as a post-build step.

In CMake, the QT4 package defines variables like ${QT_DOC_DIR}, but not ${QT_BIN_DIR}. So what I ended up doing is :

add_custom_command(
    TARGET blahblah
    COMMAND ${CMAKE_COMMAND} -E copy ${QT_DOC_DIR}/../bin/QtCore4.dll ${INSTDIR}
)

Ugly, and problably only works on Wind开发者_开发百科ows.

Is there a variable I'm not aware of ? Or should I do completely another way ?

Thanks !


From share/cmake-2.8/modules/FindQt4.cmake :

#  QT_BINARY_DIR               Path to "bin" of Qt4

I wasn't too far away with QT_BIN_DIR...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜