2020-05-15 23:54:23 +08:00
|
|
|
cmake_minimum_required(VERSION 3.7.0)
|
2019-10-11 21:30:11 +08:00
|
|
|
|
2020-05-15 23:42:56 +08:00
|
|
|
project(calculator LANGUAGES CXX)
|
2019-10-11 21:30:11 +08:00
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
|
|
|
# SingleApplication base class
|
2020-05-15 23:42:56 +08:00
|
|
|
set(QAPPLICATION_CLASS QApplication)
|
2020-10-24 18:42:20 +08:00
|
|
|
add_subdirectory(../.. SingleApplication)
|
|
|
|
|
|
|
|
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Core REQUIRED)
|
2019-10-11 21:30:11 +08:00
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME}
|
|
|
|
button.h
|
|
|
|
calculator.h
|
|
|
|
button.cpp
|
|
|
|
calculator.cpp
|
|
|
|
main.cpp
|
2020-05-15 23:42:56 +08:00
|
|
|
)
|
2019-10-11 21:30:11 +08:00
|
|
|
|
2020-05-24 22:46:31 +08:00
|
|
|
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|