This command is declared in the file /opt/KasperskyOS-Community-Edition-<version>toolchain/share/cmake/Modules/platform/nk2.cmake
.
nk_build_idl_files(NAME ...)
This command creates a CMake
target for generating .idl.h
files for one or more defined IDL files using the NK compiler.
Parameters:
NAME
– name of the CMake
target for building .idl.h
files. If a target has not yet been created, it will be created by using add_library()
with the specified name. Required parameter.NOINSTALL
– if this option is specified, files will only be generated in the working directory and will not be installed in global directories: ${CMAKE_BINARY_DIR}/_headers_ ${CMAKE_BINARY_DIR}/_headers_/${PROJECT_NAME}
.NK_MODULE
– parameter in which you need to specify the package name, excluding the name of the IDL file. For example, if the package name in the IDL description is defined as kl.core.NameServer
, the kl.core
value must be passed in the NK_MODULE
parameter.WORKING_DIRECTORY
– working directory for calling the NK compiler, which is ${CMAKE_CURRENT_BINARY_DIR}
by default.DEPENDS
– additional build targets on which the IDL file depends.To add multiple targets, you need to use multiple DEPENDS
parameters.
IDL
– path to the IDL file for which the idl.h file is being generated. Required parameter.To add multiple IDL files, you need to use multiple IDL
parameters.
If one IDL file imports another IDL file, idl.h files need to be generated in the order necessary for compliance with dependencies (with the most deeply nested first).
NK_FLAGS
– additional flags for the NK compiler.Example call:
nk_build_idl_files (echo_idl_files NK_MODULE "echo" IDL "resources/Ping.idl")
For an example of using this command, see the article titled "CMakeLists.txt files for building application software".
Page top