Add instructions to compile on MacOS AMD64 and ARM64 (#244)
* Add instructions to compile on MacOS AMD64 and ARM64 * Update build instructions for QT6 * Update BUILD-INSTRUCTIONS-MACOS.md
This commit is contained in:
@@ -2,19 +2,37 @@ gLabels MacOS Build Instructions
|
||||
================================
|
||||
|
||||
## Prerequisites
|
||||
|
||||
```
|
||||
brew install cmake
|
||||
brew install qt
|
||||
brew install qt@6
|
||||
```
|
||||
|
||||
## Optional dependencies
|
||||
```
|
||||
brew install zlib
|
||||
brew install qrencode
|
||||
brew install zint
|
||||
```
|
||||
|
||||
## Compile and Install
|
||||
|
||||
<pre>
|
||||
export SDKROOT=$(xcrun --show-sdk-path)
|
||||
# Detect architecture and set appropriate paths
|
||||
if [[ "$(uname -m)" == "arm64" ]]; then
|
||||
# Apple Silicon
|
||||
CMAKE_PATH="/opt/homebrew/bin/cmake"
|
||||
CMAKE_PREFIX_PATH="/opt/homebrew/opt"
|
||||
else
|
||||
# Intel
|
||||
CMAKE_PATH="/usr/local/bin/cmake"
|
||||
CMAKE_PREFIX_PATH="/usr/local/opt"
|
||||
fi
|
||||
|
||||
cd <i>glabels_source_directory</i>
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D CMAKE_PREFIX_PATH=/usr/local/opt/qt ..
|
||||
$CMAKE_PATH -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH/qt@6 ..
|
||||
make
|
||||
sudo make install
|
||||
</pre>
|
||||
|
||||
Reference in New Issue
Block a user