Created
June 8, 2019 18:12
-
-
Save ruohola/9d85d1e2b2796c307cc4e4dfc5c66d6f to your computer and use it in GitHub Desktop.
CMakeList for running Qt project in CLion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.14) | |
project(projectname) | |
set(CMAKE_CXX_STANDARD 17) | |
# Needed for Qt | |
set(CMAKE_AUTOUIC ON) | |
set(CMAKE_AUTOMOC ON) | |
include_directories(.) | |
add_executable(projectname | |
main.cpp | |
MainWindow.cpp | |
MainWindow.h) | |
# Needed for Qt | |
list(APPEND CMAKE_PREFIX_PATH "/Users/eero/Qt/5.12.3/clang_64/lib/cmake") | |
find_package(Qt5Widgets REQUIRED) | |
target_link_libraries(projectname Qt5::Widgets) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment