Answer the question
In order to leave comments, you need to log in
How to add QT components to cmake?
I want to add a network component to the project. In qmake I would just add QT += network. How to do also in cmake? Tried like this:
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets Network REQUIRED)
Answer the question
In order to leave comments, you need to log in
You need and target_link_libraries
. One find_package
is not enough.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question