aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/CMakeLists.txt
diff options
context:
space:
mode:
authorHennadii Chernyshchyk <genaloner@gmail.com>2019-10-11 16:30:11 +0300
committerItay Grudev <itay+89bf5c@grudev.com>2019-10-11 16:30:11 +0300
commit81465e1eec5f469f5e95649c50d0cc0e3f68d79e (patch)
tree8731cf63c72afe497c267a1b36819f51a779cfdf /examples/basic/CMakeLists.txt
parentFix compilation warning/error (#74) (diff)
downloadsingleapplication-81465e1eec5f469f5e95649c50d0cc0e3f68d79e.tar.xz
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
Diffstat (limited to 'examples/basic/CMakeLists.txt')
-rw-r--r--examples/basic/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt
new file mode 100644
index 0000000..4f1902b
--- /dev/null
+++ b/examples/basic/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 3.1.0)
+
+project(basic)
+
+# SingleApplication base class
+set(QAPPLICATION_CLASS QCoreApplication CACHE STRING "Inheritance class for SingleApplication")
+
+add_executable(basic
+ main.cpp
+ )
+
+find_package(Qt5 COMPONENTS Core REQUIRED)
+add_subdirectory(../.. SingleApplication)
+target_link_libraries(${PROJECT_NAME} Qt5::Core SingleApplication)
+