diff options
Diffstat (limited to 'cmake/QtPostProcessHelpers.cmake')
-rw-r--r-- | cmake/QtPostProcessHelpers.cmake | 289 |
1 files changed, 193 insertions, 96 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake index ba564dbae7..0a207f6634 100644 --- a/cmake/QtPostProcessHelpers.cmake +++ b/cmake/QtPostProcessHelpers.cmake @@ -1,5 +1,9 @@ -function(qt_internal_write_depends_file target module_include_name) - set(outfile "${QT_BUILD_DIR}/include/${module_include_name}/${module_include_name}Depends") +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +function(qt_internal_write_depends_file target) + get_target_property(module_depends_header ${target} _qt_module_depends_header) + set(outfile "${module_depends_header}") set(contents "/* This file was generated by cmake with the info from ${target} target. */\n") string(APPEND contents "#ifdef __cplusplus /* create empty PCH in C mode */\n") foreach (m ${ARGN}) @@ -80,11 +84,6 @@ function(qt_internal_remove_qt_dependency_duplicates out_deps deps) if(dep) list(FIND ${out_deps} "${dep}" dep_seen) - # If the library depends on the Private and non-Private targets, - # we only need to 'find_dependency' for one of them. - if(dep_seen EQUAL -1 AND "${dep}" MATCHES "(.+)Private\;(.+)") - list(FIND ${out_deps} "${CMAKE_MATCH_1};${CMAKE_MATCH_2}" dep_seen) - endif() if(dep_seen EQUAL -1) list(LENGTH dep len) if(NOT (len EQUAL 2)) @@ -107,14 +106,13 @@ endfunction() function(qt_internal_create_module_depends_file target) get_target_property(target_type "${target}" TYPE) + set(is_interface_lib FALSE) if(target_type STREQUAL "INTERFACE_LIBRARY") - set(arg_HEADER_MODULE ON) - else() - set(arg_HEADER_MODULE OFF) + set(is_interface_lib TRUE) endif() set(depends "") - if(target_type STREQUAL "STATIC_LIBRARY" AND NOT arg_HEADER_MODULE) + if(target_type STREQUAL "STATIC_LIBRARY") get_target_property(depends "${target}" LINK_LIBRARIES) endif() @@ -131,7 +129,7 @@ function(qt_internal_create_module_depends_file target) set(target_deps_seen "") set(qt_module_dependencies "") - if(NOT arg_HEADER_MODULE) + if(NOT is_interface_lib) get_target_property(extra_depends "${target}" QT_EXTRA_PACKAGE_DEPENDENCIES) endif() if(NOT extra_depends MATCHES "-NOTFOUND$") @@ -163,7 +161,7 @@ function(qt_internal_create_module_depends_file target) # Extra QtFooModuleTools packages to be added as dependencies to # QtModuleDependencies.cmake. Needed for QtWaylandCompositor / QtWaylandClient. - if(NOT arg_HEADER_MODULE) + if(NOT is_interface_lib) get_target_property(extra_tools_package_dependencies "${target}" QT_EXTRA_TOOLS_PACKAGE_DEPENDENCIES) if(extra_tools_package_dependencies) @@ -178,24 +176,25 @@ function(qt_internal_create_module_depends_file target) # Normalize module by stripping leading "Qt::" and trailing "Private" if (dep MATCHES "(Qt|${QT_CMAKE_EXPORT_NAMESPACE})::([-_A-Za-z0-9]+)") set(dep "${CMAKE_MATCH_2}") - if (TARGET Qt::${dep}) - get_target_property(dep_type Qt::${dep} TYPE) - if (NOT dep_type STREQUAL "INTERFACE_LIBRARY") - get_target_property(skip_module_depends_include Qt::${dep} QT_MODULE_SKIP_DEPENDS_INCLUDE) - if (skip_module_depends_include) - continue() - endif() - else() - get_target_property(is_versionless_target Qt::${dep} _qt_is_versionless_target) - if(is_versionless_target) - get_target_property(module_has_headers ${QT_CMAKE_EXPORT_NAMESPACE}::${dep} - _qt_module_has_headers) - else() - get_target_property(module_has_headers Qt::${dep} _qt_module_has_headers) - endif() - if (NOT module_has_headers) - continue() - endif() + set(real_dep_target "Qt::${dep}") + + if(TARGET "${real_dep_target}") + get_target_property(is_versionless_target "${real_dep_target}" + _qt_is_versionless_target) + if(is_versionless_target) + set(real_dep_target "${QT_CMAKE_EXPORT_NAMESPACE}::${dep}") + endif() + + get_target_property(skip_module_depends_include "${real_dep_target}" + _qt_module_skip_depends_include) + if(skip_module_depends_include) + continue() + endif() + + get_target_property(module_has_headers "${real_dep_target}" + _qt_module_has_headers) + if(NOT module_has_headers) + continue() endif() endif() endif() @@ -208,9 +207,10 @@ function(qt_internal_create_module_depends_file target) # Make the ModuleTool package depend on dep's ModuleTool package. list(FIND tool_deps_seen ${dep} dep_seen) if(dep_seen EQUAL -1 AND ${dep} IN_LIST QT_KNOWN_MODULES_WITH_TOOLS) + qt_internal_get_package_version_of_target("${dep}" dep_package_version) list(APPEND tool_deps_seen ${dep}) list(APPEND tool_deps - "${INSTALL_CMAKE_NAMESPACE}${dep}Tools\;${PROJECT_VERSION}") + "${INSTALL_CMAKE_NAMESPACE}${dep}Tools\;${dep_package_version}") endif() endif() endforeach() @@ -219,14 +219,15 @@ function(qt_internal_create_module_depends_file target) # Add dependency to the main ModuleTool package to ModuleDependencies file. if(${target} IN_LIST QT_KNOWN_MODULES_WITH_TOOLS) + qt_internal_get_package_version_of_target("${target}" main_module_tool_package_version) list(APPEND main_module_tool_deps - "${INSTALL_CMAKE_NAMESPACE}${target}Tools\;${PROJECT_VERSION}") + "${INSTALL_CMAKE_NAMESPACE}${target}Tools\;${main_module_tool_package_version}") endif() foreach(dep ${target_deps}) if(NOT dep MATCHES ".+Private$" AND dep MATCHES "${INSTALL_CMAKE_NAMESPACE}(.+)") - # target_deps cointains elements that are a pair of target name and version, + # target_deps contains elements that are a pair of target name and version, # e.g. 'Core\;6.2' # After the extracting from the target_deps list, the element becomes a list itself, # because it loses escape symbol before the semicolon, so ${CMAKE_MATCH_1} is the list: @@ -249,8 +250,7 @@ function(qt_internal_create_module_depends_file target) get_target_property(hasModuleHeaders "${target}" _qt_module_has_headers) if (${hasModuleHeaders}) - get_target_property(module_include_name "${target}" _qt_module_include_name) - qt_internal_write_depends_file(${target} ${module_include_name} ${qtdeps}) + qt_internal_write_depends_file(${target} ${qtdeps}) endif() if(third_party_deps OR main_module_tool_deps OR target_deps) @@ -258,6 +258,10 @@ function(qt_internal_create_module_depends_file target) qt_path_join(config_build_dir ${QT_CONFIG_BUILD_DIR} ${path_suffix}) qt_path_join(config_install_dir ${QT_CONFIG_INSTALL_DIR} ${path_suffix}) + # All module packages should look for the Qt6 package version that qtbase was originally + # built as. + qt_internal_get_package_version_of_target(Platform main_qt_package_version) + # Configure and install ModuleDependencies file. configure_file( "${QT_CMAKE_DIR}/QtModuleDependencies.cmake.in" @@ -271,6 +275,9 @@ function(qt_internal_create_module_depends_file target) COMPONENT Devel ) + message(TRACE "Recorded dependencies for module: ${target}\n" + " Qt dependencies: ${target_deps}\n" + " 3rd-party dependencies: ${third_party_deps}") endif() if(tool_deps) # The value of the property will be used by qt_export_tools. @@ -286,6 +293,13 @@ function(qt_internal_create_plugin_depends_file target) unset(optional_public_depends) set(target_deps_seen "") + + # Extra 3rd party targets who's packages should be considered dependencies. + get_target_property(extra_third_party_deps "${target}" _qt_extra_third_party_dep_targets) + if(NOT extra_third_party_deps) + set(extra_third_party_deps "") + endif() + qt_collect_third_party_deps(${target}) qt_internal_remove_qt_dependency_duplicates(target_deps "${target_deps}") @@ -322,6 +336,10 @@ function(qt_internal_create_plugin_depends_file target) DESTINATION "${config_install_dir}" COMPONENT Devel ) + + message(TRACE "Recorded dependencies for plugin: ${target}\n" + " Qt dependencies: ${target_deps}\n" + " 3rd-party dependencies: ${third_party_deps}") endif() endfunction() @@ -348,7 +366,17 @@ function(qt_internal_create_qt6_dependencies_file) endif()") endif() - if(third_party_deps) + _qt_internal_determine_if_host_info_package_needed(platform_requires_host_info_package) + + if(platform_requires_host_info_package) + # TODO: Figure out how to make the initial QT_HOST_PATH var relocatable in relation + # to the target CMAKE_INSTALL_DIR, if at all possible to do so in a reliable way. + get_filename_component(qt_host_path_absolute "${QT_HOST_PATH}" ABSOLUTE) + get_filename_component(qt_host_path_cmake_dir_absolute + "${Qt${PROJECT_VERSION_MAJOR}HostInfo_DIR}/.." ABSOLUTE) + endif() + + if(third_party_deps OR platform_requires_host_info_package) # Setup build and install paths. set(path_suffix "${INSTALL_CMAKE_NAMESPACE}") @@ -387,17 +415,14 @@ function(qt_internal_create_depends_files) endforeach() endfunction() -# This function creates the Qt<Module>Plugins.cmake used to list all -# the plug-in target files. -function(qt_internal_create_plugins_files) - # The plugins cmake configuration is only needed for static builds. Dynamic builds don't need - # the application to link against plugins at build time. - if(QT_BUILD_SHARED_LIBS) - return() - endif() +# This function creates Qt<Module>Plugins.cmake files used to include all +# the plugin Config files that belong to that module. +function(qt_internal_create_plugins_auto_inclusion_files) + # For static library builds, the plugin targets need to be available for linking. + # For shared library builds, the plugin targets are useful for deployment purposes. qt_internal_get_qt_repo_known_modules(repo_known_modules) - message("Generating Plugins files for ${repo_known_modules}...") + set(modules_with_plugins "") foreach (QT_MODULE ${repo_known_modules}) get_target_property(target_type "${QT_MODULE}" TYPE) if(target_type STREQUAL "INTERFACE_LIBRARY") @@ -410,16 +435,72 @@ function(qt_internal_create_plugins_files) if(QT_MODULE STREQUAL "Qml") set(QT_MODULE_PLUGIN_INCLUDES "${QT_MODULE_PLUGIN_INCLUDES} -file(GLOB __qt_qml_plugins_config_file_list \"\${CMAKE_CURRENT_LIST_DIR}/QmlPlugins/${INSTALL_CMAKE_NAMESPACE}*Config.cmake\") +# Qml plugin targets might have dependencies on other qml plugin targets, but the Targets.cmake +# files are included in the order that file(GLOB) returns, which means certain targets that are +# referenced might not have been created yet, and \${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE +# might be set to a message saying those targets don't exist. +# +# Postpone checking of which targets don't exist until all Qml PluginConfig.cmake files have been +# included, by including all the files one more time and checking for errors at each step. +# +# TODO: Find a better way to deal with this, perhaps by using find_package() instead of include +# for the Qml PluginConfig.cmake files. + +# Distributions should probably change this default. +if(NOT DEFINED QT_SKIP_AUTO_QML_PLUGIN_INCLUSION) + set(QT_SKIP_AUTO_QML_PLUGIN_INCLUSION OFF) +endif() + +set(__qt_qml_plugins_config_file_list \"\") +set(__qt_qml_plugins_glob_prefixes \"\${CMAKE_CURRENT_LIST_DIR}\") + +# Allow passing additional prefixes where we will glob for PluginConfig.cmake files. +if(QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES) + foreach(__qt_qml_plugin_glob_prefix IN LISTS QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES) + if(__qt_qml_plugin_glob_prefix) + list(APPEND __qt_qml_plugins_glob_prefixes \"\${__qt_qml_plugin_glob_prefix}\") + endif() + endforeach() +endif() + +list(REMOVE_DUPLICATES __qt_qml_plugins_glob_prefixes) + +foreach(__qt_qml_plugin_glob_prefix IN LISTS __qt_qml_plugins_glob_prefixes) + file(GLOB __qt_qml_plugins_glob_config_file_list + \"\${__qt_qml_plugin_glob_prefix}/QmlPlugins/${INSTALL_CMAKE_NAMESPACE}*Config.cmake\") + if(__qt_qml_plugins_glob_config_file_list) + list(APPEND __qt_qml_plugins_config_file_list \${__qt_qml_plugins_glob_config_file_list}) + endif() +endforeach() + if (__qt_qml_plugins_config_file_list AND NOT QT_SKIP_AUTO_QML_PLUGIN_INCLUSION) + # First round of inclusions ensure all qml plugin targets are brought into scope. + foreach(__qt_qml_plugin_config_file \${__qt_qml_plugins_config_file_list}) + include(\${__qt_qml_plugin_config_file}) + + # Temporarily unset any failure markers and mark the Qml package as found. + unset(\${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE) + set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND TRUE) + endforeach() + + # For the second round of inclusions, check and bail out early if there are errors. foreach(__qt_qml_plugin_config_file \${__qt_qml_plugins_config_file_list}) include(\${__qt_qml_plugin_config_file}) + + if(\${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE) + string(APPEND \${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE + \"\nThe message was set in \${__qt_qml_plugin_config_file} \") + set(\${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + return() + endif() endforeach() + endif()") endif() - get_target_property(qt_plugins "${QT_MODULE}" QT_PLUGINS) - if(qt_plugins OR QT_MODULE_PLUGIN_INCLUDES) + get_target_property(module_plugin_types "${QT_MODULE}" MODULE_PLUGIN_TYPES) + if(module_plugin_types OR QT_MODULE_PLUGIN_INCLUDES) + list(APPEND modules_with_plugins "${QT_MODULE}") configure_file( "${QT_CMAKE_DIR}/QtPlugins.cmake.in" "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${QT_MODULE}Plugins.cmake" @@ -432,6 +513,10 @@ endif()") ) endif() endforeach() + if(modules_with_plugins) + message(STATUS "Generated QtModulePlugins.cmake files for the following modules:" + " ${modules_with_plugins}") + endif() endfunction() function(qt_generate_install_prefixes out_var) @@ -490,12 +575,11 @@ function(qt_generate_build_internals_extra_cmake_code) ${INSTALL_CMAKE_NAMESPACE}BuildInternals/QtBuildInternalsExtra.cmake) if(CMAKE_BUILD_TYPE) - # Need to force set, because CMake itself initializes a value for CMAKE_BUILD_TYPE - # at the start of project configuration (with an empty value), - # so we need to force override it. string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS - "set(CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" CACHE STRING \"Choose the type of build.\" FORCE)\n") - + " +# Used by qt_internal_set_cmake_build_type. +set(__qt_internal_initial_qt_cmake_build_type \"${CMAKE_BUILD_TYPE}\") +") endif() if(CMAKE_CONFIGURATION_TYPES) string(APPEND multi_config_specific @@ -516,14 +600,6 @@ function(qt_generate_build_internals_extra_cmake_code) string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "\nset(QT_MULTI_CONFIG_FIRST_CONFIG \"${QT_MULTI_CONFIG_FIRST_CONFIG}\")\n") endif() - # When building standalone tests against a multi-config Qt, we want to choose the first - # configuration, rather than default to Debug. - if(multi_config_specific) - string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS " -if(QT_BUILD_STANDALONE_TESTS) - set(CMAKE_BUILD_TYPE \"\${QT_MULTI_CONFIG_FIRST_CONFIG}\" CACHE STRING \"Choose the type of build.\" FORCE) -endif()\n") - endif() if(CMAKE_CROSS_CONFIGS) string(APPEND ninja_multi_config_specific @@ -554,14 +630,26 @@ endif()\n") "set(QT_IS_MACOS_UNIVERSAL \"${QT_IS_MACOS_UNIVERSAL}\" CACHE BOOL \"\")\n") endif() - if(DEFINED QT_UIKIT_SDK) + if(DEFINED QT_APPLE_SDK) + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS + "set(QT_APPLE_SDK \"${QT_APPLE_SDK}\" CACHE BOOL \"\")\n") + endif() + + if(QT_FORCE_FIND_TOOLS) + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS + "set(QT_FORCE_FIND_TOOLS \"TRUE\" CACHE BOOL \"\" FORCE)\n") + endif() + + if(QT_FORCE_BUILD_TOOLS) string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS - "set(QT_UIKIT_SDK \"${QT_UIKIT_SDK}\" CACHE BOOL \"\")\n") + "set(QT_FORCE_BUILD_TOOLS \"TRUE\" CACHE BOOL \"\" FORCE)\n") endif() - if(CMAKE_CROSSCOMPILING AND QT_BUILD_TOOLS_WHEN_CROSSCOMPILING) + if(QT_INTERNAL_EXAMPLES_INSTALL_PREFIX) + file(TO_CMAKE_PATH + "${QT_INTERNAL_EXAMPLES_INSTALL_PREFIX}" examples_install_prefix) string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS - "set(QT_BUILD_TOOLS_WHEN_CROSSCOMPILING \"TRUE\" CACHE BOOL \"\" FORCE)\n") + "set(QT_INTERNAL_EXAMPLES_INSTALL_PREFIX \"${examples_install_prefix}\" CACHE STRING \"\")\n") endif() # Save the default qpa platform. @@ -611,13 +699,18 @@ endif()\n") string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "set(QT_EXTRA_RPATHS \"${QT_EXTRA_RPATHS}\" CACHE STRING \"\")\n") endif() + if(DEFINED QT_DISABLE_DEPRECATED_UP_TO) + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS + "set(QT_DISABLE_DEPRECATED_UP_TO \"${QT_DISABLE_DEPRECATED_UP_TO}\"" + " CACHE STRING \"\")\n") + endif() # Save pkg-config feature value to be able to query it internally as soon as BuildInternals # package is loaded. This is to avoid any pkg-config package from being found when # find_package(Qt6Core) is called in case if the feature was disabled. string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS " if(NOT QT_SKIP_BUILD_INTERNALS_PKG_CONFIG_FEATURE) - set(FEATURE_pkg_config \"${FEATURE_pkg_config}\" CACHE STRING \"Using pkg-config\" FORCE) + set(FEATURE_pkg_config \"${FEATURE_pkg_config}\" CACHE BOOL \"Using pkg-config\" FORCE) endif()\n") # The OpenSSL root dir needs to be saved so that repos other than qtbase (like qtopcua) can @@ -630,35 +723,10 @@ endif()\n") "set(OPENSSL_ROOT_DIR \"${openssl_root_cmake_path}\" CACHE STRING \"\")\n") endif() - if(NOT "${CMAKE_STAGING_PREFIX}" STREQUAL "") - string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS - " -# If no explicit CMAKE_STAGING_PREFIX is provided, force set the original Qt staging prefix, -if(\"$\{CMAKE_STAGING_PREFIX}\" STREQUAL \"\" - AND NOT QT_BUILD_INTERNALS_NO_FORCE_SET_STAGING_PREFIX) - set(CMAKE_STAGING_PREFIX \"${CMAKE_STAGING_PREFIX}\" CACHE PATH - \"Staging path prefix, prepended onto install directories on the host machine.\" FORCE) -endif() -") - endif() - qt_generate_install_prefixes(install_prefix_content) string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "${install_prefix_content}") - if(NOT BUILD_SHARED_LIBS) - # The top-level check needs to happen inside QtBuildInternals, because it's possible - # to configure a top-level build with a few repos and then configure another repo - # using qt-configure-module in a separate build dir, where QT_SUPERBUILD will not - # be set anymore. - string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS - " -if(DEFINED QT_REPO_MODULE_VERSION AND NOT DEFINED QT_REPO_DEPENDENCIES AND NOT QT_SUPERBUILD) - qt_internal_read_repo_dependencies(QT_REPO_DEPENDENCIES \"$\{PROJECT_SOURCE_DIR}\") -endif() -") - endif() - if(DEFINED OpenGL_GL_PREFERENCE) string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS " @@ -667,6 +735,24 @@ set(OpenGL_GL_PREFERENCE \"${OpenGL_GL_PREFERENCE}\" CACHE STRING \"\") ") endif() + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS + " +set(QT_COPYRIGHT \"${QT_COPYRIGHT}\" CACHE STRING \"\") +") + + # Add the apple version requirements to the BuildInternals extra code, so the info is + # available when configuring a standalone test. + # Otherwise when QtSetup is included after a + # find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) + # call, Qt6ConfigExtras.cmake is not included yet, the requirements are not available and + # _qt_internal_check_apple_sdk_and_xcode_versions() would fail. + _qt_internal_export_apple_sdk_and_xcode_version_requirements(apple_requirements) + if(apple_requirements) + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS " +${apple_requirements} +") + endif() + qt_compute_relative_path_from_cmake_config_dir_to_prefix() configure_file( "${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsExtra.cmake.in" @@ -716,7 +802,7 @@ function(qt_internal_create_config_file_for_standalone_tests) continue() endif() - get_target_property(is_3rd_party "${m}" QT_MODULE_IS_3RDPARTY_LIBRARY) + get_target_property(is_3rd_party "${m}" _qt_module_is_3rdparty_library) if(NOT is_3rd_party) list(APPEND modules "${m}") endif() @@ -731,9 +817,13 @@ function(qt_internal_create_config_file_for_standalone_tests) return() endif() - # Ceate a Config file that calls find_package on the modules that were built as part + # Create a Config file that calls find_package on the modules that were built as part # of the current repo. This is used for standalone tests. - qt_internal_get_standalone_tests_config_file_name(tests_config_file_name) + qt_internal_get_standalone_parts_config_file_name(tests_config_file_name) + + # Standalone tests Config files should follow the main versioning scheme. + qt_internal_get_package_version_of_target(Platform main_qt_package_version) + configure_file( "${QT_CMAKE_DIR}/QtStandaloneTestsConfig.cmake.in" "${config_build_dir}/${tests_config_file_name}" @@ -773,8 +863,15 @@ function(qt_internal_generate_user_facing_tools_info) if(NOT filename) set(filename ${target}) endif() + set(linkname ${filename}) + if(APPLE) + get_target_property(is_macos_bundle ${target} MACOSX_BUNDLE ) + if(is_macos_bundle) + set(filename "${filename}.app/Contents/MacOS/${filename}") + endif() + endif() qt_path_join(tool_target_path "${CMAKE_INSTALL_PREFIX}" "${INSTALL_BINDIR}" "${filename}") - qt_path_join(tool_link_path "${INSTALL_PUBLICBINDIR}" "${filename}${PROJECT_VERSION_MAJOR}") + qt_path_join(tool_link_path "${INSTALL_PUBLICBINDIR}" "${linkname}${PROJECT_VERSION_MAJOR}") list(APPEND lines "${tool_target_path} ${tool_link_path}") endforeach() string(REPLACE ";" "\n" content "${lines}") |