From 74cb331af3cfe723ae16cd1b00c9dd9291b4e7e9 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 7 Jul 2020 15:24:45 +0200 Subject: CMake: Regenerate examples Change-Id: I1c51b10af4e2b26f54740f257164c56a0e2a03ce Reviewed-by: Joerg Bornemann Reviewed-by: Qt CI Bot --- examples/dbus/CMakeLists.txt | 5 +-- examples/dbus/chat/.prev_CMakeLists.txt | 6 +++- examples/dbus/chat/CMakeLists.txt | 6 +++- examples/dbus/complexpingpong/CMakeLists.txt | 40 ++++++++++++++++++++-- examples/dbus/listnames/CMakeLists.txt | 6 +++- examples/dbus/pingpong/CMakeLists.txt | 40 ++++++++++++++++++++-- .../remotecontrolledcar/car/.prev_CMakeLists.txt | 6 +++- .../dbus/remotecontrolledcar/car/CMakeLists.txt | 6 +++- .../controller/.prev_CMakeLists.txt | 6 +++- .../remotecontrolledcar/controller/CMakeLists.txt | 6 +++- 10 files changed, 114 insertions(+), 13 deletions(-) (limited to 'examples/dbus') diff --git a/examples/dbus/CMakeLists.txt b/examples/dbus/CMakeLists.txt index 42a3df658a..065cc76022 100644 --- a/examples/dbus/CMakeLists.txt +++ b/examples/dbus/CMakeLists.txt @@ -1,12 +1,13 @@ # Generated from dbus.pro. +if(NOT TARGET Qt::DBus) + return() +endif() add_subdirectory(listnames) add_subdirectory(pingpong) - if(QT_FEATURE_process) add_subdirectory(complexpingpong) endif() - if(TARGET Qt::Widgets) add_subdirectory(chat) add_subdirectory(remotecontrolledcar) diff --git a/examples/dbus/chat/.prev_CMakeLists.txt b/examples/dbus/chat/.prev_CMakeLists.txt index 7889868753..a78bd3683d 100644 --- a/examples/dbus/chat/.prev_CMakeLists.txt +++ b/examples/dbus/chat/.prev_CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/dbus/chat") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt index f2fb0a55f8..e39a960af0 100644 --- a/examples/dbus/chat/CMakeLists.txt +++ b/examples/dbus/chat/CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/dbus/chat") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt index 01a824e5e7..6ea75ad4e7 100644 --- a/examples/dbus/complexpingpong/CMakeLists.txt +++ b/examples/dbus/complexpingpong/CMakeLists.txt @@ -1,5 +1,36 @@ -# Generated from complexpong.pro. +# Generated from complexpingpong.pro. +cmake_minimum_required(VERSION 3.14) +project(complexping LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong") + +find_package(Qt6 COMPONENTS DBus) + +add_qt_gui_executable(complexping + complexping.cpp complexping.h + ping-common.h +) +target_link_libraries(complexping PUBLIC + # Remove: gui + Qt::DBus +) + +install(TARGETS complexping + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) cmake_minimum_required(VERSION 3.14) project(complexpong LANGUAGES CXX) @@ -9,7 +40,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong") find_package(Qt6 COMPONENTS DBus) @@ -20,6 +55,7 @@ target_link_libraries(complexpong PUBLIC # Remove: gui Qt::DBus ) + install(TARGETS complexpong RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt index acc1db632c..a5a1a4b94f 100644 --- a/examples/dbus/listnames/CMakeLists.txt +++ b/examples/dbus/listnames/CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/dbus/listnames") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/listnames") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS DBus) diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt index 6a2a84e974..1c488b857e 100644 --- a/examples/dbus/pingpong/CMakeLists.txt +++ b/examples/dbus/pingpong/CMakeLists.txt @@ -1,5 +1,36 @@ -# Generated from pong.pro. +# Generated from pingpong.pro. +cmake_minimum_required(VERSION 3.14) +project(ping LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong") + +find_package(Qt6 COMPONENTS DBus) + +add_qt_gui_executable(ping + ping.cpp + ping-common.h +) +target_link_libraries(ping PUBLIC + # Remove: gui + Qt::DBus +) + +install(TARGETS ping + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) cmake_minimum_required(VERSION 3.14) project(pong LANGUAGES CXX) @@ -9,7 +40,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong") find_package(Qt6 COMPONENTS DBus) @@ -21,6 +56,7 @@ target_link_libraries(pong PUBLIC # Remove: gui Qt::DBus ) + install(TARGETS pong RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt index a028cbcb43..e121c9677c 100644 --- a/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/car") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt index 8be7f9ebd1..142268c1ce 100644 --- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/car") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt index 65c32e7c07..dab43f8076 100644 --- a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/controller") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt index 5ad9d2e51d..cca625fdea 100644 --- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt @@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/controller") +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) -- cgit v1.2.3