[CMake] Qt5 + cmake 3.0
Stephen Kelly
steveire at gmail.com
Sat Oct 25 02:07:47 EDT 2014
Scott Aron Bloom wrote:
> I have minimized the project to a simple testcase that will represent the
> problem, and it still exists.
You didn't attach it, right?
> In this file, I previously called include( ${QT_USE_FILE} ) to make sure
> the necessary include paths were setup correctly However, for Qt5, this
> has been replaced with modifying the target_link_libraries to include
> Qt5::Widgets (or the other necessary components)
Everything that works with Qt 5 works with Qt 4. You could use more
intermediate steps to understand whatever problem it is you're hitting.
> And the qt5_use_modules( MyLibrary Core )
According to the Qt 5 documentation, you shouldn't use this after CMake
2.8.11.
>
> The problem, is then I would need to call this, inside every libraries
> CMake file, since its required to know the "current project"
>
> Is there anyway around this issue? Where I could just add the necessary Qt
> 5 modules to current project?
I don't understand the problem. Do you just need to add a find_package?
Thanks,
Steve.
More information about the CMake
mailing list