goldendict-ng/website/docs/howto/how to compile with cmake.md
YiFang Xiao 3ea5ebeebf ocr: add how to series
doc: move howto to website
2023-05-21 14:52:11 +08:00

919 B

Linux

cmake -S . -B build_dir \
      --install-prefix=/usr/local/ \
      -G Ninja \
      -DCMAKE_BUILD_TYPE=Release
      
cmake --build build_dir --parallel 7

 cmake --install ./build_dir/

macOS

Install necessary dependencies

brew install pkg-config qt@6 bzip2 zlib \
hunspell opencc libvorbis ffmpeg

Use standard CMake build commands, then use macdeployqt ./goldendict.app to copy necessary dependencies to the app bundle.

Windows

Steps

Install Qt6(msvc) through the standard installer

Pass those parameters to cmake, the path should be changed to your actual installation paths

-DCMAKE_PREFIX_PATH=F:\Qt\6.4.1\msvc2019_64

Usewindeployqt.exe {your_build_dir}/goldendict.exe which will copy the qt related .dll and other necessary files automatically.

Due to the winlibs are built on Release mode, there are troubles to build GoldenDict on Debug mode.