mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-03 15:55:27 +08:00
qt 6.5.1 original
This commit is contained in:
1
tests/auto/cmake/test_generating_cpp_exports/.cmake.conf
Normal file
1
tests/auto/cmake/test_generating_cpp_exports/.cmake.conf
Normal file
@ -0,0 +1 @@
|
||||
set(QT_REPO_MODULE_VERSION "6.5.1")
|
23
tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
Normal file
23
tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
include(.cmake.conf)
|
||||
|
||||
project(TestGeneratingCppExports
|
||||
DESCRIPTION "Test of the generating of cpp exports"
|
||||
HOMEPAGE_URL "https://qt.io/"
|
||||
LANGUAGES CXX C
|
||||
VERSION "${QT_REPO_MODULE_VERSION}"
|
||||
)
|
||||
|
||||
find_package(Qt6 COMPONENTS Core BuildInternals Test CONFIG REQUIRED)
|
||||
qt_internal_project_setup()
|
||||
|
||||
qt_build_repo_begin()
|
||||
|
||||
add_subdirectory(test_autogenerating_cpp_exports)
|
||||
add_subdirectory(test_autogenerating_cpp_exports_custom_name)
|
||||
|
||||
qt_build_repo_end()
|
@ -0,0 +1,22 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
qt_internal_add_module(TestAutogeneratingCppExports
|
||||
NO_UNITY_BUILD
|
||||
GENERATE_CPP_EXPORTS
|
||||
SOURCES
|
||||
module_api.h
|
||||
module_api.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Core
|
||||
)
|
||||
|
||||
qt_internal_extend_target(TestAutogeneratingCppExports
|
||||
CONDITION GCC OR MINGW
|
||||
COMPILE_OPTIONS
|
||||
-fvisibility=hidden
|
||||
)
|
||||
|
||||
add_executable(TestAutogeneratingCppExportsApp use_api.cpp)
|
||||
target_link_libraries(TestAutogeneratingCppExportsApp PRIVATE TestAutogeneratingCppExports)
|
||||
set_target_properties(TestAutogeneratingCppExportsApp PROPERTIES UNITY_BUILD OFF)
|
@ -0,0 +1,9 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include "module_api.h"
|
||||
|
||||
void TestApi::dummy()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#ifndef MODULE_API_H
|
||||
#define MODULE_API_H
|
||||
|
||||
#if 0
|
||||
#pragma qt_sync_skip_header_check
|
||||
#pragma qt_sync_stop_processing
|
||||
#endif
|
||||
|
||||
#include <QtTestAutogeneratingCppExports/qttestautogeneratingcppexportsexports.h>
|
||||
|
||||
struct Q_TESTAUTOGENERATINGCPPEXPORTS_EXPORT TestApi
|
||||
{
|
||||
TestApi() = default;
|
||||
void dummy();
|
||||
};
|
||||
|
||||
#endif //MODULE_API_H
|
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include "module_api.h"
|
||||
|
||||
int main(int, char*[])
|
||||
{
|
||||
TestApi api;
|
||||
api.dummy();
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
qt_internal_add_module(TestAutogeneratingCppExportsCustomName
|
||||
NO_UNITY_BUILD
|
||||
GENERATE_CPP_EXPORTS
|
||||
CPP_EXPORT_HEADER_BASE_NAME
|
||||
"customname_exports"
|
||||
SOURCES
|
||||
module_api.h
|
||||
module_api.cpp
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Core
|
||||
)
|
||||
|
||||
qt_internal_extend_target(TestAutogeneratingCppExportsCustomName
|
||||
CONDITION GCC OR MINGW
|
||||
COMPILE_OPTIONS
|
||||
-fvisibility=hidden
|
||||
)
|
||||
|
||||
add_executable(testapp2 use_api.cpp)
|
||||
target_link_libraries(testapp2 PRIVATE TestAutogeneratingCppExportsCustomName)
|
||||
set_target_properties(testapp2 PROPERTIES UNITY_BUILD OFF)
|
@ -0,0 +1,9 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include "module_api.h"
|
||||
|
||||
void TestApi::dummy()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#ifndef MODULE_API_H
|
||||
#define MODULE_API_H
|
||||
|
||||
#if 0
|
||||
#pragma qt_sync_skip_header_check
|
||||
#pragma qt_sync_stop_processing
|
||||
#endif
|
||||
|
||||
#include <QtTestAutogeneratingCppExportsCustomName/customname_exports.h>
|
||||
|
||||
struct Q_TESTAUTOGENERATINGCPPEXPORTSCUSTOMNAME_EXPORT TestApi
|
||||
{
|
||||
TestApi() = default;
|
||||
void dummy();
|
||||
};
|
||||
|
||||
#endif //MODULE_API_H
|
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include "module_api.h"
|
||||
|
||||
int main(int, char*[])
|
||||
{
|
||||
TestApi api;
|
||||
api.dummy();
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user