aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/basic/CMakeLists.txt10
-rw-r--r--examples/calculator/CMakeLists.txt8
-rw-r--r--examples/sending_arguments/CMakeLists.txt8
3 files changed, 12 insertions, 14 deletions
diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt
index bf508cf..dd27028 100644
--- a/examples/basic/CMakeLists.txt
+++ b/examples/basic/CMakeLists.txt
@@ -1,15 +1,13 @@
cmake_minimum_required(VERSION 3.7.0)
-project(basic)
+project(basic LANGUAGES CXX)
# SingleApplication base class
-set(QAPPLICATION_CLASS QCoreApplication CACHE STRING "Inheritance class for SingleApplication")
+set(QAPPLICATION_CLASS QCoreApplication)
-add_executable(basic
- main.cpp
- )
+add_executable(basic main.cpp)
find_package(Qt5 COMPONENTS Core REQUIRED)
add_subdirectory(../.. SingleApplication)
-target_link_libraries(${PROJECT_NAME} Qt5::Core SingleApplication)
+target_link_libraries(${PROJECT_NAME} SingleApplication)
diff --git a/examples/calculator/CMakeLists.txt b/examples/calculator/CMakeLists.txt
index d81c7f3..cc570dc 100644
--- a/examples/calculator/CMakeLists.txt
+++ b/examples/calculator/CMakeLists.txt
@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.7.0)
-project(calculator)
+project(calculator LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
# SingleApplication base class
-set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication")
+set(QAPPLICATION_CLASS QApplication)
add_executable(${PROJECT_NAME}
button.h
@@ -13,8 +13,8 @@ add_executable(${PROJECT_NAME}
button.cpp
calculator.cpp
main.cpp
- )
+)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
add_subdirectory(../.. SingleApplication)
-target_link_libraries(${PROJECT_NAME} Qt5::Widgets SingleApplication)
+target_link_libraries(${PROJECT_NAME} SingleApplication)
diff --git a/examples/sending_arguments/CMakeLists.txt b/examples/sending_arguments/CMakeLists.txt
index 66e76ec..1a852b4 100644
--- a/examples/sending_arguments/CMakeLists.txt
+++ b/examples/sending_arguments/CMakeLists.txt
@@ -1,19 +1,19 @@
cmake_minimum_required(VERSION 3.7.0)
-project(sending_arguments)
+project(sending_arguments LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
# SingleApplication base class
-set(QAPPLICATION_CLASS QCoreApplication CACHE STRING "Inheritance class for SingleApplication")
+set(QAPPLICATION_CLASS QCoreApplication)
add_executable(${PROJECT_NAME}
main.cpp
messagereceiver.cpp
messagereceiver.h
main.cpp
- )
+)
find_package(Qt5 COMPONENTS Core REQUIRED)
add_subdirectory(../.. SingleApplication)
-target_link_libraries(${PROJECT_NAME} Qt5::Core SingleApplication)
+target_link_libraries(${PROJECT_NAME} SingleApplication)