This command is declared in the file named /opt/KasperskyOS-Community-Edition-<platform>-<version>/toolchain/share/cmake/Modules/platform/kos_image/nk2.cmake.
bind_nk_targets(<dependent target> <dependency1> <dependency2> ...)
This command is used to bind CMake targets generated by the add_nk_idl(), add_nk_cdl(), and add_nk_edl() commands to the main CMake target for building the application. The command accepts at least two parameters. The first parameter is the main CMake target of the build, and the remaining parameters are the CMake targets on which it depends. The binding process results in the following:
CMake targets are built is determined. If there are several dependencies, one command call can be used only if the specified dependencies are independent of each other. If one of the dependencies uses packages from another dependency, they must first be bound to each other as in the example below. Ignoring the order of dependencies when binding targets can lead to race conditions when building an application.Example call:
add_nk_idl (WRITER_SERVER_IDL
"${RESOURCE_DIR}/Writer.idl"
NK_MODULE "example"
LANG "CXX")
add_nk_edl (SERVER_EDL
"${RESOURCE_DIR}/Client.edl"
NK_MODULE "example"
LANG "CXX")
bind_nk_targets(SERVER_EDL WRITER_SERVER_IDL)
bind_nk_targets(Server SERVER_EDL)
Page top