summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--.prev_CMakeLists.txt19
-rw-r--r--CMakeLists.txt10
-rw-r--r--examples/CMakeLists.txt4
-rw-r--r--examples/oauth/CMakeLists.txt2
-rw-r--r--examples/oauth/redditclient/CMakeLists.txt48
-rw-r--r--examples/oauth/twittertimeline/CMakeLists.txt51
-rw-r--r--src/oauth/CMakeLists.txt3
-rw-r--r--tests/.prev_CMakeLists.txt10
-rw-r--r--tests/CMakeLists.txt9
-rw-r--r--tests/auto/.prev_CMakeLists.txt10
-rw-r--r--tests/auto/CMakeLists.txt4
-rw-r--r--tests/auto/abstractoauth/CMakeLists.txt1
-rw-r--r--tests/auto/oauth1/CMakeLists.txt1
-rw-r--r--tests/auto/oauth1signature/CMakeLists.txt1
-rw-r--r--tests/auto/oauth2/CMakeLists.txt1
-rw-r--r--tests/auto/oauthhttpserverreplyhandler/CMakeLists.txt1
16 files changed, 122 insertions, 53 deletions
diff --git a/.prev_CMakeLists.txt b/.prev_CMakeLists.txt
new file mode 100644
index 0000000..6f1f5c8
--- /dev/null
+++ b/.prev_CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from qtnetworkauth.pro.
+
+cmake_minimum_required(VERSION 3.15.0)
+
+project(QtNetworkAuth
+ VERSION 6.0.0
+ DESCRIPTION "Qt NetworkAuth Libraries"
+ HOMEPAGE_URL "https://qt.io/"
+ LANGUAGES CXX C
+)
+
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core SET_ME_TO_SOMETHING_USEFUL)
+find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS SET_ME_TO_SOMETHING_USEFUL)
+
+if(NOT TARGET Qt::Network)
+ message(NOTICE "Skipping the build as the condition \"TARGET Qt::Network\" is not met.")
+ return()
+endif()
+qt_build_repo()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 83d7f18..bb789b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,12 +1,18 @@
+# Generated from qtnetworkauth.pro.
+
cmake_minimum_required(VERSION 3.15.0)
project(QtNetworkAuth
VERSION 6.0.0
- DESCRIPTION "Qt Network Auth Libraries"
+ DESCRIPTION "Qt Network Auth Libraries" # special case
HOMEPAGE_URL "https://qt.io/"
LANGUAGES CXX C
)
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Network)
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Network) # special case
+if(NOT TARGET Qt::Network)
+ message(NOTICE "Skipping the build as the condition \"TARGET Qt::Network\" is not met.")
+ return()
+endif()
qt_build_repo()
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index f6594a9..9b1e409 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,3 +1,7 @@
# Generated from examples.pro.
+qt_examples_build_begin()
+
add_subdirectory(oauth)
+
+qt_examples_build_end()
diff --git a/examples/oauth/CMakeLists.txt b/examples/oauth/CMakeLists.txt
index bd3caec..baf4450 100644
--- a/examples/oauth/CMakeLists.txt
+++ b/examples/oauth/CMakeLists.txt
@@ -1,7 +1,5 @@
# Generated from oauth.pro.
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Widgets)
-
if(TARGET Qt::Widgets)
add_subdirectory(twittertimeline)
add_subdirectory(redditclient)
diff --git a/examples/oauth/redditclient/CMakeLists.txt b/examples/oauth/redditclient/CMakeLists.txt
index f621b51..3c66ff3 100644
--- a/examples/oauth/redditclient/CMakeLists.txt
+++ b/examples/oauth/redditclient/CMakeLists.txt
@@ -1,19 +1,37 @@
# Generated from redditclient.pro.
-#####################################################################
-## redditclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(redditclient LANGUAGES CXX)
-add_qt_executable(redditclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/oauth/redditclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/oauth/redditclient"
- SOURCES
- main.cpp
- redditmodel.cpp redditmodel.h
- redditwrapper.cpp redditwrapper.h
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::NetworkAuth
- 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(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 COMPONENTS Network)
+find_package(Qt6 COMPONENTS NetworkAuth)
+
+add_qt_gui_executable(redditclient
+ main.cpp
+ redditmodel.cpp redditmodel.h
+ redditwrapper.cpp redditwrapper.h
+)
+target_link_libraries(redditclient PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Network
+ Qt::NetworkAuth
+ Qt::Widgets
+)
+
+install(TARGETS redditclient
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
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}"
+)
diff --git a/src/oauth/CMakeLists.txt b/src/oauth/CMakeLists.txt
index 840e09d..7a0f254 100644
--- a/src/oauth/CMakeLists.txt
+++ b/src/oauth/CMakeLists.txt
@@ -25,6 +25,7 @@ add_qt_module(NetworkAuth
#### Keys ignored in scope 1:.:.:oauth.pro:<TRUE>:
# MODULE = "networkauth"
# _LOADED = "qt_module"
-add_qt_docs(
+add_qt_docs(NetworkAuth
doc/qtnetworkauth.qdocconf
)
+
diff --git a/tests/.prev_CMakeLists.txt b/tests/.prev_CMakeLists.txt
new file mode 100644
index 0000000..61c8c7e
--- /dev/null
+++ b/tests/.prev_CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from tests.pro.
+
+if(NOT TARGET Qt::Test)
+ cmake_minimum_required(VERSION 3.15.0)
+ project(QtNetworkAuthTests VERSION 6.0.0 LANGUAGES C CXX)
+ find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core SET_ME_TO_SOMETHING_USEFUL)
+ find_package(Qt6 ${PROJECT_VERSION} OPTIONAL_COMPONENTS SET_ME_TO_SOMETHING_USEFUL)
+ qt_set_up_standalone_tests_build()
+endif()
+qt_build_tests()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 6864b94..642d62c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,11 +1,10 @@
-# special case begin
+# Generated from tests.pro.
+
if(NOT TARGET Qt::Test)
cmake_minimum_required(VERSION 3.15.0)
- project(QtNetworkAuthTests VERSION 6.0.0 LANGUAGES C CXX ASM)
- find_package(Qt6 REQUIRED COMPONENTS BuildInternals Core NetworkAuth Test)
+ project(QtNetworkAuthTests VERSION 6.0.0 LANGUAGES C CXX)
+ find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core NetworkAuth Test) # special case
qt_set_up_standalone_tests_build()
endif()
-# special case end
qt_build_tests()
-
diff --git a/tests/auto/.prev_CMakeLists.txt b/tests/auto/.prev_CMakeLists.txt
new file mode 100644
index 0000000..ccb6649
--- /dev/null
+++ b/tests/auto/.prev_CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from auto.pro.
+
+add_subdirectory(cmake)
+add_subdirectory(oauth1)
+add_subdirectory(oauth2)
+add_subdirectory(oauth1signature)
+add_subdirectory(oauthhttpserverreplyhandler)
+if(QT_FEATURE_private_tests)
+ add_subdirectory(abstractoauth)
+endif()
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index fa4cd38..dd1f872 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -1,12 +1,10 @@
# Generated from auto.pro.
-## Currently doesn't build
-#add_subdirectory(cmake)
+# add_subdirectory(cmake) special case remove
add_subdirectory(oauth1)
add_subdirectory(oauth2)
add_subdirectory(oauth1signature)
add_subdirectory(oauthhttpserverreplyhandler)
-
if(QT_FEATURE_private_tests)
add_subdirectory(abstractoauth)
endif()
diff --git a/tests/auto/abstractoauth/CMakeLists.txt b/tests/auto/abstractoauth/CMakeLists.txt
index 23e4e29..8c2d18f 100644
--- a/tests/auto/abstractoauth/CMakeLists.txt
+++ b/tests/auto/abstractoauth/CMakeLists.txt
@@ -16,5 +16,4 @@ add_qt_test(tst_abstractoauth
)
#### Keys ignored in scope 1:.:.:abstractoauth.pro:<TRUE>:
-# CONFIG = "testcase"
# TEMPLATE = "app"
diff --git a/tests/auto/oauth1/CMakeLists.txt b/tests/auto/oauth1/CMakeLists.txt
index c4f8894..5bda83e 100644
--- a/tests/auto/oauth1/CMakeLists.txt
+++ b/tests/auto/oauth1/CMakeLists.txt
@@ -19,5 +19,4 @@ add_qt_test(tst_oauth1
)
#### Keys ignored in scope 1:.:.:oauth1.pro:<TRUE>:
-# CONFIG = "testcase"
# TEMPLATE = "app"
diff --git a/tests/auto/oauth1signature/CMakeLists.txt b/tests/auto/oauth1signature/CMakeLists.txt
index c2bc45a..8ae95ec 100644
--- a/tests/auto/oauth1signature/CMakeLists.txt
+++ b/tests/auto/oauth1signature/CMakeLists.txt
@@ -14,5 +14,4 @@ add_qt_test(tst_oauth1signature
)
#### Keys ignored in scope 1:.:.:oauth1signature.pro:<TRUE>:
-# CONFIG = "testcase"
# TEMPLATE = "app"
diff --git a/tests/auto/oauth2/CMakeLists.txt b/tests/auto/oauth2/CMakeLists.txt
index d325c9f..6db49b4 100644
--- a/tests/auto/oauth2/CMakeLists.txt
+++ b/tests/auto/oauth2/CMakeLists.txt
@@ -19,5 +19,4 @@ add_qt_test(tst_oauth2
)
#### Keys ignored in scope 1:.:.:oauth2.pro:<TRUE>:
-# CONFIG = "testcase"
# TEMPLATE = "app"
diff --git a/tests/auto/oauthhttpserverreplyhandler/CMakeLists.txt b/tests/auto/oauthhttpserverreplyhandler/CMakeLists.txt
index fd7941d..f89465c 100644
--- a/tests/auto/oauthhttpserverreplyhandler/CMakeLists.txt
+++ b/tests/auto/oauthhttpserverreplyhandler/CMakeLists.txt
@@ -15,5 +15,4 @@ add_qt_test(tst_oauthhttpserverreplyhandler
)
#### Keys ignored in scope 1:.:.:oauthhttpserverreplyhandler.pro:<TRUE>:
-# CONFIG = "testcase"
# TEMPLATE = "app"