summaryrefslogtreecommitdiffstats
path: root/examples/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'examples/corelib')
-rw-r--r--examples/corelib/CMakeLists.txt5
-rw-r--r--examples/corelib/ipc/localfortuneclient/CMakeLists.txt37
-rw-r--r--examples/corelib/ipc/localfortuneserver/CMakeLists.txt37
-rw-r--r--examples/corelib/ipc/sharedmemory/CMakeLists.txt39
-rw-r--r--examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt40
-rw-r--r--examples/corelib/serialization/cbordump/CMakeLists.txt37
-rw-r--r--examples/corelib/serialization/convert/CMakeLists.txt51
-rw-r--r--examples/corelib/serialization/savegame/CMakeLists.txt43
-rw-r--r--examples/corelib/threads/mandelbrot/CMakeLists.txt40
-rw-r--r--examples/corelib/threads/queuedcustomtype/CMakeLists.txt38
-rw-r--r--examples/corelib/threads/semaphores/CMakeLists.txt34
-rw-r--r--examples/corelib/threads/waitconditions/CMakeLists.txt34
-rw-r--r--examples/corelib/tools/contiguouscache/CMakeLists.txt34
-rw-r--r--examples/corelib/tools/customtype/CMakeLists.txt34
-rw-r--r--examples/corelib/tools/customtypesending/CMakeLists.txt36
15 files changed, 329 insertions, 210 deletions
diff --git a/examples/corelib/CMakeLists.txt b/examples/corelib/CMakeLists.txt
index 3b61d307d9..5e24def251 100644
--- a/examples/corelib/CMakeLists.txt
+++ b/examples/corelib/CMakeLists.txt
@@ -3,5 +3,8 @@
add_subdirectory(ipc)
add_subdirectory(mimetypes)
add_subdirectory(serialization)
-add_subdirectory(threads)
add_subdirectory(tools)
+
+if(QT_FEATURE_thread)
+ add_subdirectory(threads)
+endif()
diff --git a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
index 39ef3f4e3f..ae0492fe26 100644
--- a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
+++ b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from localfortuneclient.pro.
-#####################################################################
-## localfortuneclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(localfortuneclient LANGUAGES CXX)
-add_qt_executable(localfortuneclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneclient"
- SOURCES
- client.cpp client.h
- main.cpp
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(localfortuneclient WIN32 MACOSX_BUNDLE
+ client.cpp client.h
+ main.cpp
+)
+target_link_libraries(localfortuneclient PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+install(TARGETS localfortuneclient
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
index e94028413e..11fcf4e297 100644
--- a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
+++ b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from localfortuneserver.pro.
-#####################################################################
-## localfortuneserver Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(localfortuneserver LANGUAGES CXX)
-add_qt_executable(localfortuneserver
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneserver"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneserver"
- SOURCES
- main.cpp
- server.cpp server.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(localfortuneserver WIN32 MACOSX_BUNDLE
+ main.cpp
+ server.cpp server.h
+)
+target_link_libraries(localfortuneserver PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+install(TARGETS localfortuneserver
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/corelib/ipc/sharedmemory/CMakeLists.txt b/examples/corelib/ipc/sharedmemory/CMakeLists.txt
index a987433302..f4e3780348 100644
--- a/examples/corelib/ipc/sharedmemory/CMakeLists.txt
+++ b/examples/corelib/ipc/sharedmemory/CMakeLists.txt
@@ -1,21 +1,26 @@
# Generated from sharedmemory.pro.
-#####################################################################
-## sharedmemory Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(sharedmemory LANGUAGES CXX)
-add_qt_executable(sharedmemory
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/sharedmemory"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/sharedmemory"
- SOURCES
- dialog.cpp dialog.h dialog.ui
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 1:.:.:sharedmemory.pro:<TRUE>:
-# EXAMPLE_FILES = "*.png"
+add_executable(sharedmemory WIN32 MACOSX_BUNDLE
+ dialog.cpp dialog.h dialog.ui
+ main.cpp
+)
+target_link_libraries(sharedmemory PUBLIC
+ Qt::Widgets
+)
+install(TARGETS sharedmemory
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
index 4bd2b5ca6a..05e68e6d67 100644
--- a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
+++ b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
@@ -1,21 +1,27 @@
# Generated from mimetypebrowser.pro.
-#####################################################################
-## mimetypebrowser Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mimetypebrowser LANGUAGES CXX)
-add_qt_executable(mimetypebrowser
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/mimetypes/mimetypebrowser"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/mimetypes/mimetypebrowser"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- mimetypemodel.cpp mimetypemodel.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 1:.:mimetypebrowser.pro:<NONE>:
-# CONFIG = "-app_bundle" "c++11"
-# TEMPLATE = "app"
+add_executable(mimetypebrowser WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ mimetypemodel.cpp mimetypemodel.h
+)
+target_link_libraries(mimetypebrowser PUBLIC
+ Qt::Widgets
+)
+install(TARGETS mimetypebrowser
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/corelib/serialization/cbordump/CMakeLists.txt b/examples/corelib/serialization/cbordump/CMakeLists.txt
index b62181a2b7..f9f6be09d9 100644
--- a/examples/corelib/serialization/cbordump/CMakeLists.txt
+++ b/examples/corelib/serialization/cbordump/CMakeLists.txt
@@ -1,19 +1,26 @@
# Generated from cbordump.pro.
-#####################################################################
-## cbordump Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(cbordump LANGUAGES CXX)
-add_qt_executable(cbordump
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/cbordump"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/cbordump"
- SOURCES
- main.cpp
- LIBRARIES
- # Remove: gui
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
-#### Keys ignored in scope 1:.:cbordump.pro:<NONE>:
-# CONFIG = "-app_bundle"
-# TEMPLATE = "app"
+add_executable(cbordump
+ main.cpp
+)
+target_link_libraries(cbordump PUBLIC
+ # Remove: gui
+ Qt::Core
+)
+install(TARGETS cbordump
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/corelib/serialization/convert/CMakeLists.txt b/examples/corelib/serialization/convert/CMakeLists.txt
index 4dffb69c5b..f03d3aa9dc 100644
--- a/examples/corelib/serialization/convert/CMakeLists.txt
+++ b/examples/corelib/serialization/convert/CMakeLists.txt
@@ -1,26 +1,33 @@
# Generated from convert.pro.
-#####################################################################
-## convert Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(convert LANGUAGES CXX)
-add_qt_executable(convert
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/convert"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/convert"
- SOURCES
- cborconverter.cpp cborconverter.h
- converter.h
- datastreamconverter.cpp datastreamconverter.h
- jsonconverter.cpp jsonconverter.h
- main.cpp
- nullconverter.cpp nullconverter.h
- textconverter.cpp textconverter.h
- xmlconverter.cpp xmlconverter.h
- LIBRARIES
- # Remove: gui
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
-#### Keys ignored in scope 1:.:convert.pro:<NONE>:
-# CONFIG = "-app_bundle"
-# TEMPLATE = "app"
+add_executable(convert
+ cborconverter.cpp cborconverter.h
+ converter.h
+ datastreamconverter.cpp datastreamconverter.h
+ jsonconverter.cpp jsonconverter.h
+ main.cpp
+ nullconverter.cpp nullconverter.h
+ textconverter.cpp textconverter.h
+ xmlconverter.cpp xmlconverter.h
+)
+target_link_libraries(convert PUBLIC
+ # Remove: gui
+ Qt::Core
+)
+install(TARGETS convert
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/corelib/serialization/savegame/CMakeLists.txt b/examples/corelib/serialization/savegame/CMakeLists.txt
index 175fca270f..637613fef8 100644
--- a/examples/corelib/serialization/savegame/CMakeLists.txt
+++ b/examples/corelib/serialization/savegame/CMakeLists.txt
@@ -1,22 +1,29 @@
# Generated from savegame.pro.
-#####################################################################
-## savegame Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(savegame LANGUAGES CXX)
-add_qt_executable(savegame
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/savegame"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/savegame"
- SOURCES
- character.cpp character.h
- game.cpp game.h
- level.cpp level.h
- main.cpp
- LIBRARIES
- # Remove: gui
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
-#### Keys ignored in scope 1:.:savegame.pro:<NONE>:
-# CONFIG = "-app_bundle"
-# TEMPLATE = "app"
+add_executable(savegame
+ character.cpp character.h
+ game.cpp game.h
+ level.cpp level.h
+ main.cpp
+)
+target_link_libraries(savegame PUBLIC
+ # Remove: gui
+ Qt::Core
+)
+install(TARGETS savegame
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/corelib/threads/mandelbrot/CMakeLists.txt b/examples/corelib/threads/mandelbrot/CMakeLists.txt
index 00f27bacd9..9b5995b1a5 100644
--- a/examples/corelib/threads/mandelbrot/CMakeLists.txt
+++ b/examples/corelib/threads/mandelbrot/CMakeLists.txt
@@ -1,25 +1,27 @@
# Generated from mandelbrot.pro.
-#####################################################################
-## mandelbrot Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mandelbrot LANGUAGES CXX)
-add_qt_executable(mandelbrot
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/mandelbrot"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/mandelbrot"
- SOURCES
- main.cpp
- mandelbrotwidget.cpp mandelbrotwidget.h
- renderthread.cpp renderthread.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
-extend_target(mandelbrot CONDITION UNIX AND NOT APPLE_OSX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS
- LIBRARIES
- m
+add_executable(mandelbrot WIN32 MACOSX_BUNDLE
+ main.cpp
+ mandelbrotwidget.cpp mandelbrotwidget.h
+ renderthread.cpp renderthread.h
+)
+target_link_libraries(mandelbrot PUBLIC
+ Qt::Widgets
+)
+install(TARGETS mandelbrot
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
index b86092bf26..9fc8234e4d 100644
--- a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
+++ b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
@@ -1,18 +1,28 @@
# Generated from queuedcustomtype.pro.
-#####################################################################
-## queuedcustomtype Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(queuedcustomtype LANGUAGES CXX)
-add_qt_executable(queuedcustomtype
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/queuedcustomtype"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/queuedcustomtype"
- SOURCES
- block.cpp block.h
- main.cpp
- renderthread.cpp renderthread.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(queuedcustomtype WIN32 MACOSX_BUNDLE
+ block.cpp block.h
+ main.cpp
+ renderthread.cpp renderthread.h
+ window.cpp window.h
+)
+target_link_libraries(queuedcustomtype PUBLIC
+ Qt::Widgets
+)
+install(TARGETS queuedcustomtype
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/corelib/threads/semaphores/CMakeLists.txt b/examples/corelib/threads/semaphores/CMakeLists.txt
index d94f1ba5b4..51638e0ff8 100644
--- a/examples/corelib/threads/semaphores/CMakeLists.txt
+++ b/examples/corelib/threads/semaphores/CMakeLists.txt
@@ -1,15 +1,25 @@
# Generated from semaphores.pro.
-#####################################################################
-## semaphores Binary:
-#####################################################################
-
-add_qt_executable(semaphores
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/semaphores"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/semaphores"
- SOURCES
- semaphores.cpp
-)
+cmake_minimum_required(VERSION 3.14)
+project(semaphores LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:semaphores.pro:<NONE>:
-# CONFIG = "-app_bundle" "console"
+find_package(Qt5 COMPONENTS Core)
+
+add_executable(semaphores
+ semaphores.cpp
+)
+target_link_libraries(semaphores PUBLIC
+ Qt::Core
+)
+install(TARGETS semaphores
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/corelib/threads/waitconditions/CMakeLists.txt b/examples/corelib/threads/waitconditions/CMakeLists.txt
index 0a347c1cdd..4d3e61050c 100644
--- a/examples/corelib/threads/waitconditions/CMakeLists.txt
+++ b/examples/corelib/threads/waitconditions/CMakeLists.txt
@@ -1,15 +1,25 @@
# Generated from waitconditions.pro.
-#####################################################################
-## waitconditions Binary:
-#####################################################################
-
-add_qt_executable(waitconditions
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/waitconditions"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/waitconditions"
- SOURCES
- waitconditions.cpp
-)
+cmake_minimum_required(VERSION 3.14)
+project(waitconditions LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:waitconditions.pro:<NONE>:
-# CONFIG = "-moc" "-app_bundle" "console"
+find_package(Qt5 COMPONENTS Core)
+
+add_executable(waitconditions
+ waitconditions.cpp
+)
+target_link_libraries(waitconditions PUBLIC
+ Qt::Core
+)
+install(TARGETS waitconditions
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/corelib/tools/contiguouscache/CMakeLists.txt b/examples/corelib/tools/contiguouscache/CMakeLists.txt
index 68afb7221d..62214a46d5 100644
--- a/examples/corelib/tools/contiguouscache/CMakeLists.txt
+++ b/examples/corelib/tools/contiguouscache/CMakeLists.txt
@@ -1,16 +1,26 @@
# Generated from contiguouscache.pro.
-#####################################################################
-## contiguouscache Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(contiguouscache LANGUAGES CXX)
-add_qt_executable(contiguouscache
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/contiguouscache"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/contiguouscache"
- SOURCES
- main.cpp
- randomlistmodel.cpp randomlistmodel.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(contiguouscache WIN32 MACOSX_BUNDLE
+ main.cpp
+ randomlistmodel.cpp randomlistmodel.h
+)
+target_link_libraries(contiguouscache PUBLIC
+ Qt::Widgets
+)
+install(TARGETS contiguouscache
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/corelib/tools/customtype/CMakeLists.txt b/examples/corelib/tools/customtype/CMakeLists.txt
index e26846da82..394534f5ee 100644
--- a/examples/corelib/tools/customtype/CMakeLists.txt
+++ b/examples/corelib/tools/customtype/CMakeLists.txt
@@ -1,16 +1,26 @@
# Generated from customtype.pro.
-#####################################################################
-## customtype Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(customtype LANGUAGES CXX)
-add_qt_executable(customtype
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/customtype"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/customtype"
- SOURCES
- main.cpp
- message.cpp message.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(customtype WIN32 MACOSX_BUNDLE
+ main.cpp
+ message.cpp message.h
+)
+target_link_libraries(customtype PUBLIC
+ Qt::Widgets
+)
+install(TARGETS customtype
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/corelib/tools/customtypesending/CMakeLists.txt b/examples/corelib/tools/customtypesending/CMakeLists.txt
index a069f73507..53a39c57ce 100644
--- a/examples/corelib/tools/customtypesending/CMakeLists.txt
+++ b/examples/corelib/tools/customtypesending/CMakeLists.txt
@@ -1,17 +1,27 @@
# Generated from customtypesending.pro.
-#####################################################################
-## customtypesending Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(customtypesending LANGUAGES CXX)
-add_qt_executable(customtypesending
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/customtypesending"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/customtypesending"
- SOURCES
- main.cpp
- message.cpp message.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(customtypesending WIN32 MACOSX_BUNDLE
+ main.cpp
+ message.cpp message.h
+ window.cpp window.h
+)
+target_link_libraries(customtypesending PUBLIC
+ Qt::Widgets
+)
+install(TARGETS customtypesending
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)