Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
First, install the system Qt (google how to do it in your Linux), it will be much easier for you than building Qt yourself and doing everything that CLion wrote to you in the log.
Secondly, CMakeLists should be something like this (well, write your includes there, etc.):
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
project(Foo)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} -std=c++1y")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Widgets REQUIRED)
include_directories(${Qt5Widgets_INCLUDES})
add_executable(Foo main.cpp)
qt5_use_modules(Foo Widgets Core)
doc.qt.io/qt-5/cmake-manual.html
https://habrahabr.ru/post/181838/
stackoverflow.com/questions/15639781/how-to-find-q...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question