This command was introduced in Qt 6.3.
qt_add_webengine_dictionary( [TARGET] [SOURCE] [OUTPUT_DIRECTORY] )
若
无版本命令
被禁用,使用
qt6_webengine_add_dictionary()
代替。它支持如此命令的一组相同自变量。
A spell checker in Qt Web Engine needs dictionaries in a specific binary format. This CMake command converts dictionaries from the
Hunspell project
. into the
bdict
binary format. It creates a
qtwebengine_dictionaries
target, which your project can use as a dependency. This way your project can easily add dictionaries for the spell checker. Refer to the
spell checker example
了解更多细节。
TARGET
is an optinal argument and specifies the name of the application target that should depend on
qtwebengine_dictionaries
target. In other words it is used to define a build dependency to create the binary format of dictionaries before building
TARGET
.
SOURCE
is the absolute path to the
Hunspell project
dictionary for which a corresponding binary format (
.bdict
) will be created.
OUTPUT_DIRECTORY
is an optional argument and specifies the directory where the binary format of the dictionary will be created. If not specified,
CMAKE_CURRENT_BINARY_DIR
will be used as
OUTPUT_DIRECTORY
.
注意:
The
qtwebengine_dictionaries
directory or
<CONFIG>/qtwebengine_dictionaries
directories in the case of the multi-config generator is appended to OUTPUT_DIRECTORY. This helps to utilize dictionaries, as the
webengine_dictionaries
directory is the default search location.