Port Qt5Compat to cmake

Task-number: QTBUG-80312
Change-Id: I8958d0f91a4129ab23bc8294e58fa862fcdd49ac
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Sona Kurazyan 2020-04-03 14:18:37 +02:00
parent bf57ec5ba8
commit 7ac10b268c
18 changed files with 131 additions and 9 deletions

15
.prev_CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
# Generated from qt5compat.pro.
cmake_minimum_required(VERSION 3.15.0)
project(5compat_FIXME
VERSION 6.0.0
DESCRIPTION "Qt 5compat_FIXME 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 qt5compat.pro.
cmake_minimum_required(VERSION 3.15.0)
project(Qt5Compat # special case
VERSION 6.0.0
DESCRIPTION "Qt 5 Compatibility Libraries" # special case
HOMEPAGE_URL "https://qt.io/"
LANGUAGES CXX C
)
# special case begin
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
# find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS SET_ME_TO_SOMETHING_USEFUL)
# special case end
qt_build_repo()

12
coin/module_config.yaml Normal file
View File

@ -0,0 +1,12 @@
version: 2
accept_configuration:
condition: property
property: features
not_contains_value: Disable
instructions:
Build:
- !include "{{qt/qtbase}}/coin_module_build_template_v2.yaml"
Test:
- !include "{{qt/qtbase}}/coin_module_test_template_v2.yaml"

3
src/CMakeLists.txt Normal file
View File

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

20
src/core5/CMakeLists.txt Normal file
View File

@ -0,0 +1,20 @@
# Generated from core5.pro.
#####################################################################
## Core5Compat Module:
#####################################################################
qt_add_module(Core5Compat
SOURCES
qcore5global.h
qlinkedlist.cpp qlinkedlist.h
PUBLIC_LIBRARIES
Qt::Core
)
#### Keys ignored in scope 1:.:.:core5.pro:<TRUE>:
# MODULE = "core5compat"
qt_add_docs(Core5Compat
doc/qtcore5.qdocconf
)

View File

@ -1,5 +1,6 @@
TARGET = QtCore5Compat
QT = core
MODULE = core5compat
QMAKE_DOCS = $$PWD/doc/qtcore5.qdocconf

View File

@ -63,7 +63,7 @@
To link against the module, add this line to your \l qmake \c .pro file:
\code
QT += core5
QT += core5compat
\endcode
\section1 Related Information

View File

@ -29,7 +29,7 @@
\module QtCore5Compat
\title Qt 5 Core Compatibility C++ Classes
\ingroup modules
\qtvariable core5
\qtvariable core5compat
\brief Contains the Qt 5 Core APIs removed from Qt 6.

View File

@ -45,13 +45,13 @@
QT_BEGIN_NAMESPACE
#ifndef QT_STATIC
# if defined(QT_BUILD_CORE5_LIB)
# define Q_CORE5_EXPORT Q_DECL_EXPORT
# if defined(QT_BUILD_CORE5COMPAT_LIB)
# define Q_CORE5COMPAT_EXPORT Q_DECL_EXPORT
# else
# define Q_CORE5_EXPORT Q_DECL_IMPORT
# define Q_CORE5COMPAT_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_CORE5_EXPORT
# define Q_CORE5COMPAT_EXPORT
#endif
QT_END_NAMESPACE

View File

@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
namespace Qt5 {
struct Q_CORE5_EXPORT QLinkedListData
struct Q_CORE5COMPAT_EXPORT QLinkedListData
{
QLinkedListData *n, *p;
QtPrivate::RefCount ref;

7
tests/CMakeLists.txt Normal file
View File

@ -0,0 +1,7 @@
# Generated from tests.pro.
if(QT_BUILD_STANDALONE_TESTS)
# Add qt_find_package calls for extra dependencies that need to be found when building
# the standalone tests here.
endif()
qt_build_tests()

View File

@ -0,0 +1,4 @@
# Generated from auto.pro.
add_subdirectory(cmake)
add_subdirectory(core5)

View File

@ -0,0 +1,6 @@
# Generated from auto.pro.
# special case begin
# add_subdirectory(cmake)
# special case end
add_subdirectory(core5)

View File

@ -1,6 +1,6 @@
# Cause make to do nothing.
TEMPLATE = subdirs
CMAKE_QT_MODULES_UNDER_TEST = core5
CMAKE_QT_MODULES_UNDER_TEST = core5compat
CONFIG += ctest_testcase

View File

@ -0,0 +1,3 @@
# Generated from core5.pro.
add_subdirectory(qlinkedlist)

View File

@ -0,0 +1,17 @@
# Generated from qlinkedlist.pro.
#####################################################################
## tst_qlinkedlist Test:
#####################################################################
qt_add_test(tst_qlinkedlist
SOURCES
tst_qlinkedlist.cpp
DEFINES
-QT_NO_JAVA_STYLE_ITERATORS
PUBLIC_LIBRARIES
core5
)
## Scopes:
#####################################################################

View File

@ -0,0 +1,17 @@
# Generated from qlinkedlist.pro.
#####################################################################
## tst_qlinkedlist Test:
#####################################################################
qt_add_test(tst_qlinkedlist
SOURCES
tst_qlinkedlist.cpp
# DEFINES # special case remove
# -QT_NO_JAVA_STYLE_ITERATORS # special case remove until fixed
PUBLIC_LIBRARIES
Qt::Core5Compat
)
## Scopes:
#####################################################################

View File

@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qlinkedlist
QT = core5 core testlib
QT = core5compat core testlib
DEFINES -= QT_NO_JAVA_STYLE_ITERATORS
qtConfig(c++14): CONFIG += c++14
qtConfig(c++1z): CONFIG += c++1z