Created
February 27, 2016 22:33
-
-
Save meetingcpp/1a8007ca08bf1668bccc to your computer and use it in GitHub Desktop.
qt cmake (first try)
This file contains hidden or 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 2.8.11) | |
| project(cmakeqttest) | |
| # Find includes in corresponding build directories | |
| set(CMAKE_INCLUDE_CURRENT_DIR ON) | |
| # Instruct CMake to run moc automatically when needed. | |
| set(CMAKE_AUTOMOC ON) | |
| set(CMAKE_AUTOUIC ON) | |
| if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | |
| add_definitions( -std=c++11 -ftemplate-depth=512 -Wno-unused-local-typedefs -Wno-deprecated-declarations ) | |
| endif() | |
| # Find the QtWidgets library | |
| find_package(Qt5Widgets) | |
| aux_source_directory(. SRC_LIST) | |
| add_executable(${PROJECT_NAME} ${SRC_LIST}) | |
| # Use the Widgets module from Qt 5. | |
| target_link_libraries(${PROJECT_NAME} Qt5::Widgets) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment