aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/basic/CMakeLists.txt15
-rwxr-xr-xexamples/basic/basic.pro5
-rw-r--r--examples/basic/meson.build4
-rw-r--r--examples/calculator/CMakeLists.txt20
-rw-r--r--examples/calculator/calculator.pro11
-rw-r--r--examples/calculator/meson.build5
-rw-r--r--examples/sending_arguments/CMakeLists.txt19
-rw-r--r--examples/sending_arguments/meson.build5
-rwxr-xr-xexamples/sending_arguments/sending_arguments.pro9
9 files changed, 14 insertions, 79 deletions
diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt
deleted file mode 100644
index 4f1902b..0000000
--- a/examples/basic/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-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)
-
diff --git a/examples/basic/basic.pro b/examples/basic/basic.pro
deleted file mode 100755
index b7af16c..0000000
--- a/examples/basic/basic.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-# Single Application implementation
-include(../../singleapplication.pri)
-DEFINES += QAPPLICATION_CLASS=QCoreApplication
-
-SOURCES += main.cpp
diff --git a/examples/basic/meson.build b/examples/basic/meson.build
new file mode 100644
index 0000000..ba17a02
--- /dev/null
+++ b/examples/basic/meson.build
@@ -0,0 +1,4 @@
+executable('basic',
+ sources: 'main.cpp',
+ dependencies: [ SingleApplication_dep, dep_qt5 ]
+)
diff --git a/examples/calculator/CMakeLists.txt b/examples/calculator/CMakeLists.txt
deleted file mode 100644
index c90257a..0000000
--- a/examples/calculator/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-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)
diff --git a/examples/calculator/calculator.pro b/examples/calculator/calculator.pro
deleted file mode 100644
index 8f13260..0000000
--- a/examples/calculator/calculator.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-QT += widgets
-
-HEADERS = button.h \
- calculator.h
-SOURCES = button.cpp \
- calculator.cpp \
- main.cpp
-
-# Single Application implementation
-include(../../singleapplication.pri)
-DEFINES += QAPPLICATION_CLASS=QApplication
diff --git a/examples/calculator/meson.build b/examples/calculator/meson.build
new file mode 100644
index 0000000..66c177b
--- /dev/null
+++ b/examples/calculator/meson.build
@@ -0,0 +1,5 @@
+executable('calculator',
+ sources: [ 'button.cpp', 'calculator.cpp', 'main.cpp',
+ mod_qt5.preprocess(moc_headers: [ 'button.h', 'calculator.h' ], dependencies: dep_qt5) ],
+ dependencies: [ SingleApplication_dep, dep_qt5 ]
+)
diff --git a/examples/sending_arguments/CMakeLists.txt b/examples/sending_arguments/CMakeLists.txt
deleted file mode 100644
index bfdc5cc..0000000
--- a/examples/sending_arguments/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-cmake_minimum_required(VERSION 3.1.0)
-
-project(sending_arguments)
-
-set(CMAKE_AUTOMOC ON)
-
-# SingleApplication base class
-set(QAPPLICATION_CLASS QCoreApplication CACHE STRING "Inheritance class for SingleApplication")
-
-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)
diff --git a/examples/sending_arguments/meson.build b/examples/sending_arguments/meson.build
new file mode 100644
index 0000000..856ec99
--- /dev/null
+++ b/examples/sending_arguments/meson.build
@@ -0,0 +1,5 @@
+executable('sending_arguments',
+ sources: [ 'main.cpp', 'messagereceiver.cpp',
+ mod_qt5.preprocess(moc_headers: 'messagereceiver.h', dependencies: dep_qt5) ],
+ dependencies: [ SingleApplication_dep, dep_qt5 ]
+)
diff --git a/examples/sending_arguments/sending_arguments.pro b/examples/sending_arguments/sending_arguments.pro
deleted file mode 100755
index 897636a..0000000
--- a/examples/sending_arguments/sending_arguments.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-# Single Application implementation
-include(../../singleapplication.pri)
-DEFINES += QAPPLICATION_CLASS=QCoreApplication
-
-SOURCES += main.cpp \
- messagereceiver.cpp
-
-HEADERS += \
- messagereceiver.h