2022-06-27 19:11:35 +00:00
|
|
|
### Compiling ImHex on macOS
|
|
|
|
|
2023-11-02 19:41:47 +00:00
|
|
|
On macOS, ImHex is built through regular GCC and LLVM clang.
|
2022-06-27 19:11:35 +00:00
|
|
|
|
2022-08-09 20:50:02 +00:00
|
|
|
1. Clone the repo using `git clone https://github.com/WerWolv/ImHex --recurse-submodules`
|
|
|
|
2. Install all the dependencies using `brew bundle --no-lock --file dist/Brewfile`
|
|
|
|
3. Build ImHex itself using the following commands:
|
2022-06-27 19:11:35 +00:00
|
|
|
```sh
|
2022-08-09 20:50:02 +00:00
|
|
|
cd ImHex
|
2022-06-27 19:11:35 +00:00
|
|
|
mkdir -p build
|
|
|
|
cd build
|
|
|
|
CC=$(brew --prefix gcc@12)/bin/gcc-12 \
|
|
|
|
CXX=$(brew --prefix gcc@12)/bin/g++-12 \
|
|
|
|
OBJC=$(brew --prefix llvm)/bin/clang \
|
|
|
|
OBJCXX=$(brew --prefix llvm)/bin/clang++ \
|
|
|
|
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" \
|
|
|
|
MACOSX_DEPLOYMENT_TARGET="10.15" \
|
|
|
|
cmake \
|
2022-10-07 11:20:29 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2022-06-27 19:11:35 +00:00
|
|
|
-DCREATE_BUNDLE=ON \
|
|
|
|
-DCREATE_PACKAGE=ON \
|
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
|
|
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
|
|
|
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
|
|
|
..
|
|
|
|
make -j4 package
|
|
|
|
```
|
|
|
|
|
|
|
|
If the build fails while trying to find the macOS libraries, make sure you have
|
2022-10-28 06:17:10 +00:00
|
|
|
Xcode installed with `xcode-select --install`. Homebrew will also help get the
|
|
|
|
most recent SDK installed and configured with `brew doctor`.
|