Merge remote-tracking branch 'origin/wip/cmake' into dev

Change-Id: If53446f41c6576857fff305e587e8c9cc95b6656
This commit is contained in:
Alexandru Croitor 2020-06-12 12:04:33 +02:00
commit 18c140612f
26 changed files with 559 additions and 0 deletions

15
.prev_CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
# Generated from qtcoap.pro.
cmake_minimum_required(VERSION 3.15.0)
project(QtCoap
VERSION 6.0.0
DESCRIPTION "Qt Coap 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)
qt_build_repo()

17
CMakeLists.txt Normal file
View File

@ -0,0 +1,17 @@
# Generated from qtcoap.pro.
cmake_minimum_required(VERSION 3.15.0)
project(QtCoap
VERSION 6.0.0
DESCRIPTION "Qt Coap Libraries"
HOMEPAGE_URL "https://qt.io/"
LANGUAGES CXX # special case
)
# special case begin
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Network)
find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Widgets Quick Qml)
# special case end
qt_build_repo()

13
coin/module_config.yaml Normal file
View File

@ -0,0 +1,13 @@
version: 1
accept_configuration:
condition: property
property: host.os
equals_property: target.os
build_instructions:
- !include "{{qt/qtbase}}/prepare_building_env.yaml"
- !include "{{qt/qtbase}}/cmake_module_build_instructions.yaml"
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
test_instructions:
- !include "{{qt/qtbase}}/cmake_regular_test_instructions.yaml"

7
examples/CMakeLists.txt Normal file
View File

@ -0,0 +1,7 @@
# Generated from examples.pro.
qt_examples_build_begin()
add_subdirectory(coap)
qt_examples_build_end()

View File

@ -0,0 +1,8 @@
# Generated from coap.pro.
add_subdirectory(simplecoapclient)
add_subdirectory(consolecoapclient)
if(TARGET Qt::Quick)
add_subdirectory(quicksecureclient)
add_subdirectory(quickmulticastclient)
endif()

View File

@ -0,0 +1,32 @@
# Generated from consolecoapclient.pro.
cmake_minimum_required(VERSION 3.14)
project(testapp LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples/coap/consolecoapclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Coap)
add_qt_gui_executable(testapp
coaphandler.cpp coaphandler.h
main.cpp
)
target_link_libraries(testapp PUBLIC
Qt::Coap
Qt::Core
Qt::Network
)
install(TARGETS testapp
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -0,0 +1,53 @@
# Generated from quickmulticastclient.pro.
cmake_minimum_required(VERSION 3.14)
project(quickmulticastclient LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples/coap/quickmulticastclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS Coap)
add_qt_gui_executable(quickmulticastclient
main.cpp
qmlcoapmulticastclient.cpp qmlcoapmulticastclient.h
)
target_compile_definitions(quickmulticastclient PUBLIC
QT_DEPRECATED_WARNINGS
)
target_link_libraries(quickmulticastclient PUBLIC
Qt::Coap
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
# Resources:
set(qml_resource_files
"main.qml"
)
qt6_add_resources(quickmulticastclient "qml"
PREFIX
"/"
FILES
${qml_resource_files}
)
install(TARGETS quickmulticastclient
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -0,0 +1,54 @@
# Generated from quicksecureclient.pro.
cmake_minimum_required(VERSION 3.14)
project(quicksecureclient LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples/coap/quicksecureclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS Coap)
add_qt_gui_executable(quicksecureclient
main.cpp
qmlcoapsecureclient.cpp qmlcoapsecureclient.h
)
target_compile_definitions(quicksecureclient PUBLIC
QT_DEPRECATED_WARNINGS
)
target_link_libraries(quicksecureclient PUBLIC
Qt::Coap
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
# Resources:
set(qml_resource_files
"FilePicker.qml"
"main.qml"
)
qt6_add_resources(quicksecureclient "qml"
PREFIX
"/"
FILES
${qml_resource_files}
)
install(TARGETS quicksecureclient
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -0,0 +1,41 @@
# Generated from simplecoapclient.pro.
cmake_minimum_required(VERSION 3.14)
project(simplecoapclient LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples/coap/simplecoapclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Coap)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(simplecoapclient
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
optiondialog.cpp optiondialog.h optiondialog.ui
)
target_compile_definitions(simplecoapclient PUBLIC
QT_DEPRECATED_WARNINGS
)
target_link_libraries(simplecoapclient PUBLIC
Qt::Coap
Qt::Core
Qt::Gui
Qt::Network
Qt::Widgets
)
install(TARGETS simplecoapclient
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

3
src/CMakeLists.txt Normal file
View File

@ -0,0 +1,3 @@
# Generated from src.pro.
add_subdirectory(coap)

34
src/coap/CMakeLists.txt Normal file
View File

@ -0,0 +1,34 @@
# Generated from coap.pro.
#####################################################################
## Coap Module:
#####################################################################
qt_add_module(Coap
SOURCES
qcoapclient.cpp qcoapclient.h qcoapclient_p.h
qcoapconnection.cpp qcoapconnection_p.h
qcoapglobal.h
qcoapinternalmessage.cpp qcoapinternalmessage_p.h
qcoapinternalreply.cpp qcoapinternalreply_p.h
qcoapinternalrequest.cpp qcoapinternalrequest_p.h
qcoapmessage.cpp qcoapmessage.h qcoapmessage_p.h
qcoapnamespace.cpp qcoapnamespace.h qcoapnamespace_p.h
qcoapoption.cpp qcoapoption.h qcoapoption_p.h
qcoapprotocol.cpp qcoapprotocol_p.h
qcoapqudpconnection.cpp qcoapqudpconnection_p.h
qcoapreply.cpp qcoapreply.h qcoapreply_p.h
qcoaprequest.cpp qcoaprequest.h qcoaprequest_p.h
qcoapresource.cpp qcoapresource.h qcoapresource_p.h
qcoapresourcediscoveryreply.cpp qcoapresourcediscoveryreply.h qcoapresourcediscoveryreply_p.h
qcoapsecurityconfiguration.cpp qcoapsecurityconfiguration.h
LIBRARIES
Qt::CorePrivate
Qt::Network
PUBLIC_LIBRARIES
Qt::Core
)
qt_add_docs(Coap
doc/qtcoap.qdocconf
)

View File

@ -0,0 +1,11 @@
# Generated from tests.pro.
if(NOT TARGET Qt::Test)
cmake_minimum_required(VERSION 3.15.0)
project(QtCoapTests 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()

13
tests/CMakeLists.txt Normal file
View File

@ -0,0 +1,13 @@
# Generated from tests.pro.
if(NOT TARGET Qt::Test)
cmake_minimum_required(VERSION 3.15.0)
project(QtCoapTests VERSION 6.0.0 LANGUAGES C CXX)
# special case begin
find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core Network Test Coap)
# find_package(Qt6 ${PROJECT_VERSION} OPTIONAL_COMPONENTS SET_ME_TO_SOMETHING_USEFUL)
# special case end
qt_set_up_standalone_tests_build()
endif()
qt_build_tests()

View File

@ -0,0 +1,14 @@
# Generated from auto.pro.
add_subdirectory(cmake)
add_subdirectory(qcoapclient)
add_subdirectory(qcoapmessage)
add_subdirectory(qcoapoption)
add_subdirectory(qcoaprequest)
add_subdirectory(qcoapresource)
if(QT_FEATURE_private_tests)
add_subdirectory(qcoapqudpconnection)
add_subdirectory(qcoapinternalrequest)
add_subdirectory(qcoapinternalreply)
add_subdirectory(qcoapreply)
endif()

16
tests/auto/CMakeLists.txt Normal file
View File

@ -0,0 +1,16 @@
# Generated from auto.pro.
# special case begin
# add_subdirectory(cmake)
# sepcial case end
add_subdirectory(qcoapclient)
add_subdirectory(qcoapmessage)
add_subdirectory(qcoapoption)
add_subdirectory(qcoaprequest)
add_subdirectory(qcoapresource)
if(QT_FEATURE_private_tests)
add_subdirectory(qcoapqudpconnection)
add_subdirectory(qcoapinternalrequest)
add_subdirectory(qcoapinternalreply)
add_subdirectory(qcoapreply)
endif()

View File

@ -0,0 +1,28 @@
# Generated from qcoapclient.pro.
#####################################################################
## qcoapclient Test:
#####################################################################
qt_add_test(qcoapclient
SOURCES
../coapnetworksettings.h
tst_qcoapclient.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)
#### Keys ignored in scope 1:.:.:qcoapclient.pro:<TRUE>:
# QT_TEST_SERVER_LIST = "californium" "freecoap"
## Scopes:
#####################################################################
qt_extend_target(qcoapclient CONDITION NOT COAP_TEST_SERVER_IP_ISEMPTY
DEFINES
COAP_TEST_SERVER_IP=\\\"$ENV{COAP_TEST_SERVER_IP}\\\"
)

View File

@ -0,0 +1,32 @@
# Generated from qcoapclient.pro.
#####################################################################
## qcoapclient Test:
#####################################################################
qt_add_test(qcoapclient
EXCEPTIONS # special case
GUI
SOURCES
../coapnetworksettings.h
tst_qcoapclient.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)
#### Keys ignored in scope 1:.:.:qcoapclient.pro:<TRUE>:
# QT_TEST_SERVER_LIST = "californium" "freecoap"
## Scopes:
#####################################################################
# special case begin
qt_extend_target(qcoapclient CONDITION DEFINED ENV{COAP_TEST_SERVER_IP}
DEFINES
COAP_TEST_SERVER_IP=\\\"$ENV{COAP_TEST_SERVER_IP}\\\"
)
# special case end

View File

@ -0,0 +1,16 @@
# Generated from qcoapinternalreply.pro.
#####################################################################
## qcoapinternalreply Test:
#####################################################################
qt_add_test(qcoapinternalreply
SOURCES
tst_qcoapinternalreply.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)

View File

@ -0,0 +1,16 @@
# Generated from qcoapinternalrequest.pro.
#####################################################################
## qcoapinternalrequest Test:
#####################################################################
qt_add_test(qcoapinternalrequest
SOURCES
tst_qcoapinternalrequest.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)

View File

@ -0,0 +1,15 @@
# Generated from qcoapmessage.pro.
#####################################################################
## qcoapmessage Test:
#####################################################################
qt_add_test(qcoapmessage
SOURCES
tst_qcoapmessage.cpp
LIBRARIES
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)

View File

@ -0,0 +1,15 @@
# Generated from qcoapoption.pro.
#####################################################################
## qcoapoption Test:
#####################################################################
qt_add_test(qcoapoption
SOURCES
tst_qcoapoption.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
)

View File

@ -0,0 +1,28 @@
# Generated from qcoapqudpconnection.pro.
#####################################################################
## qcoapqudpconnection Test:
#####################################################################
qt_add_test(qcoapqudpconnection
SOURCES
../coapnetworksettings.h
tst_qcoapqudpconnection.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)
#### Keys ignored in scope 1:.:.:qcoapqudpconnection.pro:<TRUE>:
# QT_TEST_SERVER_LIST = "californium"
## Scopes:
#####################################################################
qt_extend_target(qcoapqudpconnection CONDITION NOT COAP_TEST_SERVER_IP_ISEMPTY
DEFINES
COAP_TEST_SERVER_IP=\\\"$ENV{COAP_TEST_SERVER_IP}\\\"
)

View File

@ -0,0 +1,30 @@
# Generated from qcoapqudpconnection.pro.
#####################################################################
## qcoapqudpconnection Test:
#####################################################################
qt_add_test(qcoapqudpconnection
SOURCES
../coapnetworksettings.h
tst_qcoapqudpconnection.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)
#### Keys ignored in scope 1:.:.:qcoapqudpconnection.pro:<TRUE>:
# QT_TEST_SERVER_LIST = "californium"
## Scopes:
#####################################################################
# special case begin
qt_extend_target(qcoapqudpconnection CONDITION DEFINED ENV{COAP_TEST_SERVER_IP}
DEFINES
COAP_TEST_SERVER_IP=\\\"$ENV{COAP_TEST_SERVER_IP}\\\"
)
# special case end

View File

@ -0,0 +1,16 @@
# Generated from qcoapreply.pro.
#####################################################################
## qcoapreply Test:
#####################################################################
qt_add_test(qcoapreply
SOURCES
tst_qcoapreply.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)

View File

@ -0,0 +1,16 @@
# Generated from qcoaprequest.pro.
#####################################################################
## qcoaprequest Test:
#####################################################################
qt_add_test(qcoaprequest
SOURCES
tst_qcoaprequest.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)

View File

@ -0,0 +1,16 @@
# Generated from qcoapresource.pro.
#####################################################################
## qcoapresource Test:
#####################################################################
qt_add_test(qcoapresource
SOURCES
tst_qcoapresource.cpp
LIBRARIES
Qt::CoapPrivate
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Coap
Qt::Network
)