1
0
mirror of synced 2024-11-28 09:30:51 +01:00
ImHex/dist/compiling/linux.md

27 lines
1.0 KiB
Markdown
Raw Normal View History

### Compiling ImHex on Linux
2022-08-09 22:50:02 +02:00
On Linux, ImHex is built through regular GCC (or optionally Clang).
2022-08-09 22:50:02 +02:00
1. Clone the repo using `git clone https://github.com/WerWolv/ImHex --recurse-submodules`
2. Install the dependencies using one of the `dist/get_deps_*.sh` scripts. Choose the one that matches your distro.
3. Build ImHex itself using the following commands:
```sh
2022-08-09 22:50:02 +02:00
cd ImHex
mkdir -p build
cd build
CC=gcc-12 CXX=g++-12 cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
..
make -j 4 install
```
All paths follow the XDG Base Directories standard, and can thus be modified
with the environment variables `XDG_CONFIG_HOME`, `XDG_CONFIG_DIRS`,
`XDG_DATA_HOME` and `XDG_DATA_DIRS`.