This module make libraries and executables build in this projects available to others projects.
qi_stage_lib(target [DEPRECATED <deprecated> ...]
[DEPENDS <depends> ...]
[INCLUDE_DIRS <include_dirs> ...]
[DEFINITIONS <definitions> ...]
[PATH_SUFFIXES <path_suffixes> ...]
)
Arguments: |
|
---|
Generate a ‘name’-config.cmake, allowing other project to find the library. Usage of the various arguments are a bit tricky, so please read Using qi_stage_lib before using them
qi_stage_header_only_lib(target [DEPRECATED <deprecated> ...]
[DEPENDS <depends> ...]
[INCLUDE_DIRS <include_dirs> ...]
[DEFINITIONS <definitions> ...]
[PATH_SUFFIXES <path_suffixes> ...]
)
Arguments: |
|
---|
Generate a ‘name’-config.cmake, allowing other project to find the library. This library does not have to be a cmake target, it’s a header only library.
qi_stage_cmake(module)
Arguments: |
|
---|
stage a cmake file For instance, assuming you have a foo-config.cmake file containing my_awesome_function, you can do:
qi_stage_cmake("foo-config.cmake")
Then later, (in an other project, or in the same project):
find_package(foo)
my_awesome_function()
qi_use_lib(name [<remaining args> ...]
)
Arguments: |
|
---|
Handles dependencies between projects.
Call find_package for you, then do all the include_directories and target_link_libraries that are needed.
Note
The name must be an existing target, so you must call qi_use_lib after qi_create_bin or qi_create_lib
You can however call qi_use_lib several times, for instance:
qi_create_bin(foo)
...
qi_use_lib(foo bar)
if(UNIX)
qi_use_lib(foo PTHREAD)
endif()