[CMake] Qt 5, macOS, bundle install

Romain LEGUAY romain.leguay at gmail.com
Tue Oct 9 11:27:05 EDT 2018


I found the solution!!

I just add the plugins attached to the Qt Component (in my case Qt5Widgets) and install it:

set(qtplugins)
foreach(plugin ${Qt5Widgets_PLUGINS})
    get_target_property(_loc ${plugin} LOCATION)
    list(APPEND qtplugins ${_loc})
endforeach()

install_qt5_executable("${exe}" "${qtplugins}" "" "${dirs}" "")

I found a part of the solution in the Qt documentation (http://doc.qt.io/qt-5/cmake-manual.html#imported-targets <http://doc.qt.io/qt-5/cmake-manual.html#imported-targets>).

How can I add this simple example inside the CMake example/tutorial?

Romain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20181009/fd05c2a4/attachment.html>


More information about the CMake mailing list