summaryrefslogtreecommitdiffstats
path: root/src/entrypoint
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2021-06-11 13:36:10 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2021-06-15 12:51:49 +0200
commit02855ff6e076d04b7ae748c2485f1e098c32d698 (patch)
tree895a32d67e2d095861a86abf1cc0acc6c52ac380 /src/entrypoint
parent01d30e2d5331d0d15516ce3bf7559fcc19b69723 (diff)
Adjust the EntryPoint target name according to the internal module naming policy
Pick-to: 6.2 Task-number: QTBUG-87775 Change-Id: I1d6097c950f97e102c44e2952edc98caa4deb6c6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/entrypoint')
-rw-r--r--src/entrypoint/CMakeLists.txt32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/entrypoint/CMakeLists.txt b/src/entrypoint/CMakeLists.txt
index 5242337ee4..c173870e92 100644
--- a/src/entrypoint/CMakeLists.txt
+++ b/src/entrypoint/CMakeLists.txt
@@ -4,14 +4,14 @@ if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
return()
endif()
-# The EntryPoint package consists of two targets: one for CMake consumption,
+# The EntryPointPrivate package consists of two targets: one for CMake consumption,
# and one internal that produces the static library. Together these form the
# entrypoint module in qmake terms. This split allows us to inject library
# dependencies that need to go _before_ the static library, to work around
# CMake's lack of whole archive.
# ---- The header-only target produces the actual module ----
-qt_internal_add_module(EntryPoint
+qt_internal_add_module(EntryPointPrivate
HEADER_MODULE
INTERNAL_MODULE
NO_SYNC_QT
@@ -20,9 +20,9 @@ qt_internal_add_module(EntryPoint
NO_ADDITIONAL_TARGET_INFO
)
-set(export_targets EntryPoint)
+set(export_targets EntryPointPrivate)
# We don't need any include paths or default module defines
-set_target_properties(EntryPoint PROPERTIES
+set_target_properties(EntryPointPrivate PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ""
INTERFACE_COMPILE_DEFINITIONS ""
)
@@ -70,28 +70,34 @@ if(WIN32)
# The mingw32 library needs to come before the entry-point library in the
# linker line, so that the static linker will pick up the WinMain symbol
# from the entry-point library.
- target_link_libraries(EntryPoint INTERFACE mingw32)
- set_property(TARGET EntryPoint APPEND PROPERTY INTERFACE_QT_MODULE_LDFLAGS "-lmingw32")
+ target_link_libraries(EntryPointPrivate INTERFACE mingw32)
+ set_property(TARGET EntryPointPrivate
+ APPEND PROPERTY INTERFACE_QT_MODULE_LDFLAGS "-lmingw32"
+ )
- target_compile_definitions(EntryPoint INTERFACE QT_NEEDS_QMAIN)
+ target_compile_definitions(EntryPointPrivate INTERFACE QT_NEEDS_QMAIN)
qt_internal_extend_target(EntryPointImplementation DEFINES QT_NEEDS_QMAIN)
endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
- set_target_properties(EntryPoint PROPERTIES INTERFACE_LINK_OPTIONS "-Wl,-e,_qt_main_wrapper")
- set_property(TARGET EntryPoint APPEND PROPERTY INTERFACE_QT_MODULE_LDFLAGS "-Wl,-e,_qt_main_wrapper")
+ set_target_properties(EntryPointPrivate PROPERTIES
+ INTERFACE_LINK_OPTIONS "-Wl,-e,_qt_main_wrapper"
+ )
+ set_property(TARGET EntryPointPrivate
+ APPEND PROPERTY INTERFACE_QT_MODULE_LDFLAGS "-Wl,-e,_qt_main_wrapper"
+ )
endif()
# ---- Finally, make sure the static library can be consumed by clients -----
if(using_entrypoint_library)
- target_link_libraries(EntryPoint INTERFACE Qt6::EntryPointImplementation)
+ target_link_libraries(EntryPointPrivate INTERFACE Qt6::EntryPointImplementation)
qt_internal_get_target_property(entrypoint_implementation_ldflags
EntryPointImplementation QT_MODULE_LDFLAGS)
- set_target_properties(EntryPoint PROPERTIES
+ set_target_properties(EntryPointPrivate PROPERTIES
INTERFACE_QT_MODULE_PRI_EXTRA_CONTENT "
QT.entrypoint_implementation.name = QtEntryPointImplementation
QT.entrypoint_implementation.module = Qt6EntryPoint${QT_LIBINFIX}
@@ -102,12 +108,12 @@ QT.entrypoint_implementation.module_config = staticlib v2 internal_module
INTERFACE_QT_MODULE_DEPENDS "entrypoint_implementation"
)
- set(export_name "${INSTALL_CMAKE_NAMESPACE}EntryPointTargets")
+ set(export_name "${INSTALL_CMAKE_NAMESPACE}EntryPointPrivateTargets")
qt_install(TARGETS EntryPointImplementation EXPORT ${export_name})
qt_generate_prl_file(EntryPointImplementation "${INSTALL_LIBDIR}")
endif()
-set(export_name_prefix "${INSTALL_CMAKE_NAMESPACE}EntryPoint")
+set(export_name_prefix "${INSTALL_CMAKE_NAMESPACE}EntryPointPrivate")
qt_path_join(config_install_dir ${QT_CONFIG_INSTALL_DIR} ${export_name_prefix})
qt_internal_export_additional_targets_file(
TARGETS ${export_targets}