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

Configuring example targeting iOS with CMake + Xcode generator fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.0
    • Build System: CMake
    • iOS/tvOS/watchOS
    • 1e1805ed36a932dcb085a1ad3308782a136d477c (qt/qtbase/dev)

    Description

      Configuring analogclock with the Xcode generator fails.
      Not sure why yet.

      # Generated from analogclock.pro.
      
      cmake_minimum_required(VERSION 3.14)
      
      set(CMAKE_OSX_DEPLOYMENT_TARGET "12.2" CACHE STRING "")
      set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
      set(CMAKE_OSX_SYSROOT iphonesimulator CACHE STRING "" FORCE)
      set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING "" FORCE)
      set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
      set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "DWARF")
      
      project(analogclock LANGUAGES CXX)
      
      set(CMAKE_INCLUDE_CURRENT_DIR ON)
      
      set(CMAKE_AUTOMOC ON)
      set(CMAKE_AUTORCC ON)
      set(CMAKE_AUTOUIC ON)
      
      find_package(Qt6 COMPONENTS Core)
      find_package(Qt6 COMPONENTS Gui)
      find_package(Qt6 COMPONENTS Widgets)
      
      add_qt_gui_executable(analogclock
          analogclock.cpp analogclock.h
          main.cpp
      )
      target_link_libraries(analogclock PUBLIC
          Qt::Core
          Qt::Gui
          Qt::Widgets
      )
      
      /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/bin/qt-cmake-private -DCMAKE_SYSTEM_NAME=iOS .. -GXcode                                                                                                                                     
      -- Using Qt bundled PCRE2.
      CMake Error at /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Core/Qt6CoreTargets.cmake:80 (add_library):
        The OBJECT library type may not be used for IMPORTED libraries under Xcode
        with multiple architectures $(CURRENT_ARCH).
      Call Stack (most recent call first):
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:49 (include)
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6/Qt6Config.cmake:93 (find_package)
        CMakeLists.txt:35 (find_package)
      
      
      CMake Error at /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Core/Qt6CoreTargets.cmake:82 (set_target_properties):
        set_target_properties Can not find target to add properties to:
        Qt6::Core_resources_mimetypes
      Call Stack (most recent call first):
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:49 (include)
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6/Qt6Config.cmake:93 (find_package)
        CMakeLists.txt:35 (find_package)
      
      
      CMake Error at /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Core/Qt6CoreTargets.cmake:101 (set_property):
        set_property could not find TARGET Qt6::Core_resources_mimetypes.  Perhaps
        it has not yet been created.
      Call Stack (most recent call first):
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:49 (include)
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6/Qt6Config.cmake:93 (find_package)
        CMakeLists.txt:35 (find_package)
      
      
      CMake Error at /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Core/Qt6CoreTargets.cmake:102 (set_target_properties):
        set_target_properties Can not find target to add properties to:
        Qt6::Core_resources_mimetypes
      Call Stack (most recent call first):
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:49 (include)
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6/Qt6Config.cmake:93 (find_package)
        CMakeLists.txt:35 (find_package)
      
      
      -- Could NOT find EGL (missing: EGL_INCLUDE_DIR HAVE_EGL EGL_LIBRARY)
      -- Using Qt bundled PNG.
      -- Using Qt bundled Harfbuzz.
      -- Using Qt bundled Freetype.
      CMake Error at /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Gui/Qt6GuiTargets.cmake:81 (add_library):
        The OBJECT library type may not be used for IMPORTED libraries under Xcode
        with multiple architectures $(CURRENT_ARCH).
      Call Stack (most recent call first):
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:48 (include)
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6/Qt6Config.cmake:93 (find_package)
        CMakeLists.txt:36 (find_package)
      
      
      CMake Error at /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Gui/Qt6GuiTargets.cmake:83 (set_target_properties):
        set_target_properties Can not find target to add properties to:
        Qt6::Gui_resources_qpdf
      Call Stack (most recent call first):
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:48 (include)
        /Volumes/T3/Dev/qt/qt5_cmake/qtbase_built_developer_ios_simulator_release/lib/cmake/Qt6/Qt6Config.cmake:93 (find_package)
        CMakeLists.txt:36 (find_package)
      ........
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-87198
          # Subject Branch Project Status CR V

          Activity

            People

              alexandru.croitor Alexandru Croitor
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes