Skip to content

MacOS universal support #26

@thefat32

Description

@thefat32

I've built universal .app using my own universal build of openssl 3.1 and qt 5.15.9. I don't have an M1 mac so you are welcome to test and report. This issue is intended to keep track of work that needs to be done to create an universal build.

Link

# OpenSSL

$ git clone https://github.com/openssl/openssl.git
$ cd openssl
$ git checkout --force -b openssl-3.1 --track origin/openssl-3.1
$ git submodule update --init --recursive --force
$ mkdir build
$ cd build
$ ../Configure darwin64-arm64 --release --prefix=/Users/<username>/install/arm64/openssl
$ make -j8
$ make -j8 install_sw
$ make clean
$ ../Configure darwin64-x86_64 --release --prefix=/Users/<username>/install/x86_64/openssl
$ make -j8
$ make -j8 install_sw
$ cd /Users/<username>/install
$ mkdir -p universal/openssl/lib
$ cp -r x86_64/openssl/include universal/openssl/include
$ lipo -create arm64/openssl/lib/libcrypto.a x86_64/openssl/lib/libcrypto.a -output universal/openssl/lib/libcrypto.a
$ lipo -create arm64/openssl/lib/libssl.a x86_64/openssl/lib/libssl.a -output universal/openssl/lib/libssl.a

# Qt 5.15.9
# Download https://download.qt.io/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz

$ gunzip qt-everywhere-opensource-src-5.15.9.tar.gz
$ tar xvf qt-everywhere-opensource-src-5.15.9.tar
$ cd qt-everywhere-opensource-src-5.15.9
$ ./configure QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"  -release -prefix=/Users/<username>/install/universal/qt5
$ make -j8
$ make -j8 install

Add in Scripts/Build/BuildDarwin.sh

-D CMAKE_OSX_ARCHITECTURES="arm64;x86_64" \

Then follow normal install instructions and use own compiled libs in config

[Darwin]

   libQtPath   = /Users/<username>/install/universal/qt5
   openSSLPath = /Users/<username>/install/universal/openssl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions