mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-21 04:16:12 +00:00
ff080c1d3c
* Remove QML QtWebEngine dependency * Remove Web graphs from Dashboard * Remove web graphs from SidebarWidget * Remove web mini graph from PreviewWidget * Remove all remaining html and QtWebEngine dependencies * Update docs/Compiling-with-CMake.md after QtWebEngine removal * Remove QtWebEngine from Travis
34 lines
1.3 KiB
Markdown
34 lines
1.3 KiB
Markdown
# Compiling with CMake
|
|
|
|
The "official" way to build Cutter is by using qmake, but as an alternative, a [CMakeLists.txt](https://github.com/radareorg/cutter/blob/master/src/CMakeLists.txt) is provided, so CMake can be used as well.
|
|
|
|
This page provides a guide to compile on **Linux** or **macOS**, the process for Windows is described in [Compiling-on-Windows.md](Compiling-on-Windows.md).
|
|
|
|
## Requirements
|
|
* CMake >= 3.1
|
|
* Radare2 installed from submodule, see [README.md](https://github.com/radareorg/cutter#requirements)
|
|
* Qt 5.9.1
|
|
|
|
## Building
|
|
|
|
The root for CMake is in src/. In-source builds are **not allowed**, so you **must** run CMake from a separate directory:
|
|
```
|
|
cd src
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
```
|
|
|
|
If all went well, you should now have a working Makefile in your build directory:
|
|
```
|
|
make
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
Depending on how Qt installed (Distribution packages or using the Qt installer application), CMake may not be able to find it by itself if it is not in a common place. If that is the case, double check that the correct Qt version is installed. Locate its prefix (a directory containing bin/, lib/, include/, etc.) and specify it to CMake using `CMAKE_PREFIX_PATH` in the above process, e.g.:
|
|
```
|
|
rm CMakeCache.txt # the cache may be polluted with unwanted libraries found before
|
|
cmake -DCMAKE_PREFIX_PATH=/opt/Qt/5.9.1/gcc_64 ..
|
|
```
|