qi_submodule_create(name [NO_SOURCE_GROUP]
[SOURCE_GROUP <source_group>]
[SRC <src> ...]
[DEPENDS <depends> ...]
)
Arguments: |
|
---|
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
##
## Sample submodule
##
project(QiSubModule)
# creates a submodule named 'mysubmodule'. It have 3 sources files and brings a dependencies on qt_core
qi_submodule_create(mysubmodule SRC mylib.cpp myprivateheader.hpp mypublicheader.hpp
DEPENDS qt_core)
# appends files related to boost to the submodule, this will occur only if
# WITH_BOOST is defined.
qi_submodule_add(mysubmodule SRC mylibboostfeature.cpp myprivateboostheader.hpp mypublicboostheader.hpp
DEPENDS boost
IF WITH_BOOST)
# this creates a binary that have a dependencies on Qt and boost (if WITH_BOOST is set)
# sources are taken from the submodule. Dependencies are linked with when appropriate.
qi_create_bin(mybin SUBMODULE mysubmodule)
qi_submodule_add(name [NO_SOURCE_GROUP]
[SOURCE_GROUP <source_group>]
[IF <if>]
[SRC <src> ...]
[DEPENDS <depends> ...]
)
Arguments: |
|
---|
This function is similar to qi_submodule_create but appends content to the submodule. This function can be conditional, if you specify IF then the content will be appended to the submodule only if all the flags are defined.