SingleApplication/examples/calculator/CMakeLists.txt
Hennadii Chernyshchyk 81465e1eec Add CMake support (#66)
* Add CMake support

* Remove unused 'tr()'

* Add option to specify a class for inheritance

* Use modern syntax

* Rework CMakeLists.txt
Thanks to @akallabeth

* Add CMake build rules for examples
2019-10-11 16:30:11 +03:00

21 lines
480 B
CMake

cmake_minimum_required(VERSION 3.1.0)
project(calculator)
set(CMAKE_AUTOMOC ON)
# SingleApplication base class
set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication")
add_executable(${PROJECT_NAME}
button.h
calculator.h
button.cpp
calculator.cpp
main.cpp
)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
add_subdirectory(../.. SingleApplication)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets SingleApplication)