CMake is a handy and quick tool to generate makefiles which can then be used to build a project.
It can work in conjunction with many popular compilers including MSVC, GCC, clang. (C/C++ compilers)
Furthermore, it can be also used to produce makefiles for Java and Fortran.
In this tutorial you will learn how to build - a really nice extension for customizing IDA's GUI.
For more information/details visit the .
Acquisition
First off, you will ofc need . You can either use the CLI or the GUI.
I prefer to use the GUI because it's easier to set missing/invalid cache variables.
The plugin is using Qt stylesheets, hence you will need to link the Qt libraries.
For that install Qt 5.x if your plan is to build the plugin for IDA 6.9 and higher or Qt 4.x for IDA 6.8 and below.
However I recommend to install both if you are going to work alot with Qt.
After downloading and installing CMake and Qt we will need the actual source code to build from.
Go ahead and clone the project or download it as zip-file if you haven't got GitHub Desktop.
You will note a CMakeLists.txt - that's the main script file, used to let CMake know what to do.
Preparing the environment
Open the cmake folder and head to the IDA.cmake file.
Edit line 29/30 to point to the SDK and to the IDA installation directory, respectively.
Alternatively, you can also set two environment variables "IDASDK" and "IDADIR".
This being done the only thing we still need to do is to let CMake know where our Qt dependencies are.
There are a few possibilities to do that:
- Set the cached CMAKE_PREFIX_PATH variable to e.g. C:\Qt\5.7\msvc2015_64
- Set the environment variable CMAKE_PREFIX_PATH to e.g. C:\Qt\5.7\msvc2015_64
Building the project file
Fire up cmake-gui and set the source path to the path where the CMakeLists.txt is contained in.
For the build path I will create a new directory in the source path called 'bin' and assign that path to the build path.
If you decided to set the cached variables you can do now in the entry view(Assuming you have already loaded the CMakeFiles.txt file)
or you have to go back and set them in the CMakeLists.txt file before you make any call to 'find_package'.