.. Generated by qibuild/doc/tools/gen_cmake_doc.py .. DO NOT EDIT .. highlight:: cmake .. _using-submodules: Using submodules ================= .. _qi_submodule_create: qi_submodule_create ------------------- .. cmake:function:: qi_submodule_create(name [NO_SOURCE_GROUP] [SOURCE_GROUP ] [SRC ...] [DEPENDS ...]) :arg name: The name of the submodule :arg NO_SOURCE_GROUP: Do not create a source_group :arg SOURCE_GROUP: By default a source_group with name is created, if sourcegroup is specified then the source_group name will be name\\sourcegroup :arg SRC: The list of source to include in the submodule :arg DEPENDS: The list of dependencies A submodule is a convenient place to store source paths, dependencies and public headers. Submodule can be added a library or a module. Submodules are directly visible in Visual Studio. **Example** .. literalinclude:: /samples/submodule/CMakeLists.txt :language: cmake .. _qi_submodule_add: qi_submodule_add ---------------- .. cmake:function:: qi_submodule_add(name [NO_SOURCE_GROUP] [SOURCE_GROUP ] [IF ] [SRC ...] [DEPENDS ...]) :arg name: The name of the submodule :arg NO_SOURCE_GROUP: Do not create a source_group. :arg SOURCE_GROUP: By default a source_group with name is created, if sourcegroup is specified then the source_group name will be name\\sourcegroup :arg IF: Condition that should be verified before adding content for example (WITH_QT) :arg SRC: The list of sources to include in the submodule :arg DEPENDS: The list of dependencies This function is similar to qi_submodule_create but appends content to the submodule. This function can be condionnal, if you specify IF then the content will be appended to the submodule only if the flags are defined.