Skip to content

Commit

Permalink
CMake: Add more examples
Browse files Browse the repository at this point in the history
Change-Id: I7a8a3fd0a844a518592957fe07c6e707dd452d5f
Reviewed-by: Alexandru Croitor <[email protected]>
  • Loading branch information
hunger committed Mar 26, 2019
1 parent a0a9457 commit 64c6c94
Show file tree
Hide file tree
Showing 88 changed files with 1,637 additions and 5 deletions.
21 changes: 20 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
if(QT_FEATURE_gui)
add_subdirectory(corelib)
add_subdirectory(embedded)
add_subdirectory(qpa)

if(TARGET Qt::DBus)
add_subdirectory(dbus)
endif()
if(TARGET Qt::Network)
add_subdirectory(network)
endif()
if(TARGET Qt::Test)
add_subdirectory(qtestlib)
endif()
if(TARGET Qt::Concurrent)
add_subdirectory(qtconcurrent)
endif()
if(TARGET Qt::Sql)
add_subdirectory(sql)
endif()
if(TARGET Qt::Gui)
add_subdirectory(gui)
endif()
7 changes: 7 additions & 0 deletions examples/corelib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Generated from corelib.pro.

add_subdirectory(ipc)
add_subdirectory(mimetypes)
add_subdirectory(serialization)
add_subdirectory(threads)
add_subdirectory(tools)
14 changes: 14 additions & 0 deletions examples/corelib/ipc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated from ipc.pro.


if(QT_FEATURE_sharedmemory)
add_subdirectory(sharedmemory)
endif()

if(TARGET Qt::Network)

if(QT_FEATURE_localserver)
add_subdirectory(localfortuneserver)
add_subdirectory(localfortuneclient)
endif()
endif()
17 changes: 17 additions & 0 deletions examples/corelib/ipc/localfortuneclient/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated from localfortuneclient.pro.

#####################################################################
## localfortuneclient Binary:
#####################################################################

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
)
17 changes: 17 additions & 0 deletions examples/corelib/ipc/localfortuneserver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated from localfortuneserver.pro.

#####################################################################
## localfortuneserver Binary:
#####################################################################

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
)
19 changes: 19 additions & 0 deletions examples/corelib/ipc/sharedmemory/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated from sharedmemory.pro.

#####################################################################
## sharedmemory Binary:
#####################################################################

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
LIBRARIES
Qt::Widgets
)

#### Keys ignored in scope 1:.:sharedmemory.pro:<NONE>:
# EXAMPLE_FILES = "*.png"
6 changes: 6 additions & 0 deletions examples/corelib/mimetypes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from mimetypes.pro.


if(TARGET Qt::Widgets)
add_subdirectory(mimetypebrowser)
endif()
21 changes: 21 additions & 0 deletions examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated from mimetypebrowser.pro.

#####################################################################
## mimetypebrowser Binary:
#####################################################################

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
)

#### Keys ignored in scope 1:.:mimetypebrowser.pro:<NONE>:
# CONFIG = "-app_bundle" "c++11"
# TEMPLATE = "app"
5 changes: 5 additions & 0 deletions examples/corelib/serialization/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Generated from serialization.pro.

add_subdirectory(cbordump)
add_subdirectory(convert)
add_subdirectory(savegame)
19 changes: 19 additions & 0 deletions examples/corelib/serialization/cbordump/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated from cbordump.pro.

#####################################################################
## cbordump Binary:
#####################################################################

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
)

#### Keys ignored in scope 1:.:cbordump.pro:<NONE>:
# CONFIG = "-app_bundle"
# TEMPLATE = "app"
26 changes: 26 additions & 0 deletions examples/corelib/serialization/convert/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated from convert.pro.

#####################################################################
## convert Binary:
#####################################################################

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
)

#### Keys ignored in scope 1:.:convert.pro:<NONE>:
# CONFIG = "-app_bundle"
# TEMPLATE = "app"
22 changes: 22 additions & 0 deletions examples/corelib/serialization/savegame/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated from savegame.pro.

#####################################################################
## savegame Binary:
#####################################################################

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
)

#### Keys ignored in scope 1:.:savegame.pro:<NONE>:
# CONFIG = "-app_bundle"
# TEMPLATE = "app"
9 changes: 9 additions & 0 deletions examples/corelib/threads/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated from threads.pro.

add_subdirectory(semaphores)
add_subdirectory(waitconditions)

if(TARGET Qt::Widgets)
add_subdirectory(mandelbrot)
add_subdirectory(queuedcustomtype)
endif()
25 changes: 25 additions & 0 deletions examples/corelib/threads/mandelbrot/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated from mandelbrot.pro.

#####################################################################
## mandelbrot Binary:
#####################################################################

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
)

## Scopes:
#####################################################################

extend_target(mandelbrot CONDITION UNIX AND NOT APPLE_OSX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS
LIBRARIES
m
)
18 changes: 18 additions & 0 deletions examples/corelib/threads/queuedcustomtype/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated from queuedcustomtype.pro.

#####################################################################
## queuedcustomtype Binary:
#####################################################################

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
)
15 changes: 15 additions & 0 deletions examples/corelib/threads/semaphores/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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
)

#### Keys ignored in scope 1:.:semaphores.pro:<NONE>:
# CONFIG = "-app_bundle" "console"
15 changes: 15 additions & 0 deletions examples/corelib/threads/waitconditions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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
)

#### Keys ignored in scope 1:.:waitconditions.pro:<NONE>:
# CONFIG = "-moc" "-app_bundle" "console"
5 changes: 5 additions & 0 deletions examples/corelib/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Generated from tools.pro.

add_subdirectory(contiguouscache)
add_subdirectory(customtype)
add_subdirectory(customtypesending)
16 changes: 16 additions & 0 deletions examples/corelib/tools/contiguouscache/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated from contiguouscache.pro.

#####################################################################
## contiguouscache Binary:
#####################################################################

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
)
16 changes: 16 additions & 0 deletions examples/corelib/tools/customtype/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated from customtype.pro.

#####################################################################
## customtype Binary:
#####################################################################

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
)
17 changes: 17 additions & 0 deletions examples/corelib/tools/customtypesending/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated from customtypesending.pro.

#####################################################################
## customtypesending Binary:
#####################################################################

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
)
13 changes: 13 additions & 0 deletions examples/dbus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated from dbus.pro.

add_subdirectory(listnames)
add_subdirectory(pingpong)

if(QT_FEATURE_process)
add_subdirectory(complexpingpong)
endif()

if(TARGET Qt::Widgets)
add_subdirectory(chat)
add_subdirectory(remotecontrolledcar)
endif()
22 changes: 22 additions & 0 deletions examples/dbus/chat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated from chat.pro.

#####################################################################
## chat Binary:
#####################################################################

add_qt_executable(chat
GUI
OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/chat"
INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/chat"
SOURCES
chat.cpp chat.h
chatmainwindow.ui
chatsetnickname.ui
DBUS_ADAPTOR_SOURCES
org.example.chat.xml
DBUS_INTERFACE_SOURCES
org.example.chat.xml
LIBRARIES
Qt::DBus
Qt::Widgets
)
Loading

0 comments on commit 64c6c94

Please sign in to comment.