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> ...]
[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(name [DEPRECATED <deprecated> ...]
[DEPENDS <depends> ...]
[INCLUDE_DIRS <include_dirs> ...]
[PATH_SUFFIXES <path_suffixes> ...]
)
Arguments: |
|
---|
Generate a ‘name’-config.cmake, allowing other projects to find the header-only library. If the library has some dependencies, use something like:
find_package(FOO)
include_directories(${FOO_INCLUDE_DIRS})
qi_stage_header_only_lib(bar DEPENDS FOO)
qi_stage_bin(target)
Arguments: |
|
---|
Generate a ‘name’-config.cmake, allowing other projects to find the binary
Example
# in foo/CMakeLists.txt
qi_create_bin(foo foo.cpp)
qi_stage_bin(foo)
# in bar/CMakeLists.txt:
find_package(foo)
# Do something with ${FOO_EXECUTABLE}
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_stage_script(file_name [TRAMPOLINE]
[PYTHON]
[DEPENDS <depends> ...]
)
Arguments: |
|
---|
Stage an executable script
Will stage a cmake file so that others can locate the script. Use like this:
qi_stage_script(src/myscript)
And in other projects:
find_package(myscript)
use_script_in_function(${MYSCRIPT_EXECUTABLE})
qi_use_lib(name [<remaining args> ...]
[ASSUME_SYSTEM_INCLUDE]
)
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()
qi_stage_dir(directory)
Arguments: |
|
---|
For this to work, configuration files should be in etc and data files in share
Note that this function does not create any install rule, so you should call qi_install_data(share/... ) for the files to be found after your project is installed.
See Managing data
qi_add_bin_sdk(path)
Arguments: |
|
---|
Register the given path as a CMAKE_PREFIX_PATH.
Used when pre-compiled binaries are put under version control.
Note that the pre-compiled SDK must have the following layout:
lib
libfoo.so
include
foo
foo.h
share
cmake
foo
foo-config.cmake