Qt5 no longer relies on a CMake module file to find a Qt5 installation, but provides its own CMake configuration file, which installs Qt5 libraries as imported CMake targets. To get the actual path to the Qt module library file, request the LOCATION property for the CMake target object or its configuration version version LOCATION_<Config> , for example:
find_package(Qt5Core) get_target_property(QtCore_location_Release Qt5::Core LOCATION_Release) find_package(Qt5Widgets) get_target_property(QtWidgets_location_Release Qt5::Widgets LOCATION_Release)
This strategy is probably also applicable to Qt plugins if you know the target name of the CMake plugin (I have not confirmed this yet).
Also see the Qt5 CMake manual.
sakra source share