Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-120487

Symlinks generated in user_facing_tool_links.txt during configuration are incorrect for MacOS

    XMLWordPrintable

Details

    • macOS
    • 2921a70e5 (dev), 06e9da856 (6.7), c1ef2ae81 (6.6), bbd641479 (tqtc/lts-6.5)

    Description

      In the file qt6/qtbase/cmake/QtPostProcessHelpers.cmake file in the qt_internal_generate_user_facing_tools_info() function the generated symlinks for MacOS do not take into account that some of the applications are formal MacOS .app packages. This causes the generated symlinks to be invalid. Downstream this causes problems when trying to create a Qt6 based application and packaging it against the qt-feedstock generated packages. The testing phase of the conda-build will fail because it tries to validate the executables and determines that they are missing.

      Here is a corrected function that will generate the proper symlinks on MacOS systems

      function(qt_internal_generate_user_facing_tools_info)
          if("${INSTALL_PUBLICBINDIR}" STREQUAL "")
              return()
          endif()
          get_property(user_facing_tool_targets GLOBAL PROPERTY QT_USER_FACING_TOOL_TARGETS)
          set(lines "")
          foreach(target ${user_facing_tool_targets})
              get_target_property(filename ${target} OUTPUT_NAME)
              set(sym_link_target ${target})
              if(NOT filename)
                  set(filename ${target})
              endif()
              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}" "${sym_link_target}${PROJECT_VERSION_MAJOR}")
              list(APPEND lines "${tool_target_path} ${tool_link_path}")
          endforeach()
          string(REPLACE ";" "\n" content "${lines}")
          string(APPEND content "\n")
          set(out_file "${PROJECT_BINARY_DIR}/user_facing_tool_links.txt")
          file(WRITE "${out_file}" "${content}")
      endfunction()
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            mike.jackson Michael Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes