Compile Krita source code with CMake GUI on Windows 10 and use MinGW 64 as build tool

krita series article directory

提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加
For example: the use of pandas in Chapter 1 Introduction to Python Machine Learning


提示:写完文章后,目录可以自动生成,如何生成可参考右边的帮助文档


foreword

To compile the Krita source code using the CMake GUI on Windows 10 and use MinGW 64 as the build tool, follow these steps:

Make sure CMake and MinGW 64-bit are installed. For MinGW 64-bit, you can use MSYS2 for installation. Open a MSYS2 MinGW 64-bit terminal and run the following command:
csharp
Copy code
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
Install Krita's dependencies using MSYS2. See the list of dependencies in the previous answer and install the dependencies using the same command.

Clone the Krita source code:

bash
Copy code
git clone https://invent.kde.org/graphics/krita.git
打开 CMake GUI。

In the "Where is the source code" field, browse and select the cloned Krita source code directory.

In the "Where to build the binaries" field, select the directory where you want to store the build files. Typically, you create a folder called "build" under your source code directory and select that.

Click the "Configure" button. In the pop-up dialog box, select "MinGW Makefiles" as the generator, and check "Use default native compilers". Then click the "Finish" button.

After configuring, make sure all dependencies are found correctly. Modify Krita's build options as needed. After completing the configuration, click the "Generate" button to generate the build file.

Using an MSYS2 MinGW 64-bit terminal, go to the build directory and compile Krita with the following command:

bash
Copy code
cd /path/to/your/build/directory
mingw32-make -j$(nproc)
Note that this may take some time depending on your computer performance.

1. What is pandas?

insert image description here

2. Use steps

1. Import library

insert image description here
After the installation is complete, re-run CMake to make sure the KF5KDcraw library is found. If the problem still occurs, please check whether the CMAKE_PREFIX_PATH variable contains the installation path of the KF5KDcraw library. You can also try manually setting the KF5KDcraw_DIR variable to point to the directory containing the KF5KDcrawConfig.cmake or kf5kdcraw-config.cmake file if desired.

Guess you like

Origin blog.csdn.net/aoxuestudy/article/details/130091459