summaryrefslogtreecommitdiffstats
path: root/examples/oauth/twittertimeline/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-26 16:28:56 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-30 09:14:02 +0000
commitcd5e9aa39f192f8265064e59e7771241f81a5f9c (patch)
treee5066c03b8df058cdf7847f3768f037d0dd9be45 /examples/oauth/twittertimeline/CMakeLists.txt
parente31ed2abc236f0c92ede9e1dd5ad6ecd53cc26f4 (diff)
Regenerate qtneworkauth
Fixes examples to be actually standalone examples. Also some special cases were added here and there. And some new changes that comes from the newer version of pro2cmake. Change-Id: I0053bb740e41b44bf793ec4e284283bf013eaac8 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples/oauth/twittertimeline/CMakeLists.txt')
-rw-r--r--examples/oauth/twittertimeline/CMakeLists.txt51
1 files changed, 31 insertions, 20 deletions
diff --git a/examples/oauth/twittertimeline/CMakeLists.txt b/examples/oauth/twittertimeline/CMakeLists.txt
index c7654be..c7c841c 100644
--- a/examples/oauth/twittertimeline/CMakeLists.txt
+++ b/examples/oauth/twittertimeline/CMakeLists.txt
@@ -1,25 +1,36 @@
# Generated from twittertimeline.pro.
-#####################################################################
-## twittertimeline Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(twittertimeline LANGUAGES CXX)
-add_qt_executable(twittertimeline
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/oauth/twittertimeline"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/oauth/twittertimeline"
- SOURCES
- main.cpp
- twitter.cpp twitter.h
- twitterdialog.ui
- twittertimelinemodel.cpp twittertimelinemodel.h
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::NetworkAuth
- 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(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 COMPONENTS Network)
+find_package(Qt6 COMPONENTS NetworkAuth)
+
+add_qt_gui_executable(twittertimeline
+ main.cpp
+ twitter.cpp twitter.h
+ twitterdialog.ui
+ twittertimelinemodel.cpp twittertimelinemodel.h
+)
+target_link_libraries(twittertimeline PUBLIC
+ Qt::Core
+ Qt::Network
+ Qt::NetworkAuth
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:.:twittertimeline.pro:<TRUE>:
-# CONFIG = "-app_bundle"
+install(TARGETS twittertimeline
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)