DunePathHelper

Helper commands to query path variables of Dune modules.

dune_module_path

Return a selected path associated with a Dune module.

dune_module_path(
  MODULE <module>
  RESULT <result>
  [CMAKE_MODULES|BUILD_DIR|SOURCE_DIR|SCRIPT_DIR]
)
MODULE

The name of the module whose path is requested.

RESULT

The name of the output variable receiving the result.

CMAKE_MODULES

Return the path to the module’s CMake modules directory.

BUILD_DIR

Return the path to the module’s build directory.

SOURCE_DIR

Return the path to the module’s source directory.

SCRIPT_DIR

Return the path to the module’s CMake scripts directory.

Exactly one path selector must be requested. The returned path depends on whether the command is called from the module itself or from a dependent module that already knows the exported path variables.