Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. macos universal build of Qt sources
Forum Updated to NodeBB v4.3 + New Features

macos universal build of Qt sources

Scheduled Pinned Locked Moved Solved General and Desktop
mac osuniversal
3 Posts 2 Posters 122 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gvanvoor
    wrote last edited by
    #1

    I'm attempting to make a universal build (dylibs containing both arm and intel) of Qt 6.8.3.
    According ot the documentation (https://doc.qt.io/qt-6/macos-building.html) I should pass the option -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" to configure but I still end up with arm64 only dylibs in both my build folder and the install folder. Im doing this from a script:

    	cd $QT_BUILD_DIR
    	/bin/zsh -c "\"$QT_SOURCE_DIR/configure\" $QT_CONFIGURE_OPTIONS -DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\""
    
    	cmake --build . --parallel || ( echo "Build Failed!"; exit 1 )
    

    $QT_BUILD_DIR is the path to my build output folder, $QT_SOURCE_DIR is the absolute path to the folder containing the Qt sources and $QT_CONFIGURE_OPTIONS contains options like -opensource -debug-and-release -no-framework -confirm-license things to skip etc.

    Can someone point me in the right direction to get this working? I'm bulding on an apple silicon machine and have ninja installed.

    1 Reply Last reply
    0
    • I Offline
      I Offline
      IgKh
      wrote last edited by
      #2

      Notice the standalone double dash in the example in the document. It is important, since the option is not for the configuration script itself, it is something that it needs to pass on to the underlying CMake invocations.

      G 1 Reply Last reply
      3
      • G gvanvoor has marked this topic as solved
      • I IgKh

        Notice the standalone double dash in the example in the document. It is important, since the option is not for the configuration script itself, it is something that it needs to pass on to the underlying CMake invocations.

        G Offline
        G Offline
        gvanvoor
        wrote last edited by
        #3

        @IgKh I had no idea what that double dash was for. Adding it solved thevproblem. Thanks.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved