Computer Assited Medical Intervention Tool Kit
version 4.1
|
The CMake macros especially defined to configure CMake projects using CamiTK. More...
Modules | |
cdash | |
CamiTK CMake macros used for continuous integration purpose. | |
packaging | |
CamiTK CMake macros used to create package of the CamiTK project (a custom CEP or the CamiTK project itself). | |
test | |
CamiTK CMake macros used for testing. | |
Functions | |
camitk_application () | |
macro camitk_application simplify writing a CMakeLists.txt for CamiTK application extension More... | |
camitk_extension () | |
Macro camitk_extension simplifies writing a camitk extension (component, action) More... | |
camitk_extension_project () | |
macro camitk_extension_project creates an optional (disabled by default) CEP (CamiTK Extension Project) subdirectory the build. More... | |
camitk_install_all_headers () | |
camitk_install_all_headers is a macro that install all header files of a project at build and install time More... | |
camitk_library () | |
macro camitk_library simplifies the declaration of a library inside CamiTK and is to be used for all inner project libraries More... | |
camitk_translate () | |
macro camitk_translate allows to perform the translation of any project (action, component, application and libraries) in several languages. More... | |
The CMake macros especially defined to configure CMake projects using CamiTK.
camitk_application | ( | ) |
macro camitk_application simplify writing a CMakeLists.txt for CamiTK application extension
The name of the application is automatically the name of the directory from where this macro is called prefixed with "camitk-"
On Unix additional system resources can also be automatically installed or configured: man pages, desktop file and XPM icons.
To write a simple man page, please refer to SDK application examples. If you need to generate a simple manpage or analyze the command line arguments, the CamiTK team recommands to use Code Synthesis CLI configuration (see http://codesynthesis.com/projects/cli)
usage:
DISABLED | means this is a default application is NOT to be compiled automatically |
NEEDS_ITK | means this application requires ITK to be compiled / run. |
NEEDS_CEP_LIBRARIES | list of needed camitk CEP libraries |
NEEDS_COMPONENT_EXTENSION | list of needed component extensions |
NEEDS_ACTION_EXTENSION | list of needed component extensions |
DEFINES | list of define flags to add at compilation time |
CXX_FLAGS | list of compiler flags to add (such as warning levels (-Wall ...)). |
ADDITIONAL_SOURCES | list of additional sources (that cannot be automatically found by gather_headers_and_sources macro) |
CEP_NAME | specify the CEP_NAME, which is used to categorized the application for packaging purpose No CEP_NAME provided will result in default categorization (generic application). |
DESCRIPTION | Simple description of the application. Used for packaging presentation for instance. |
INCLUDE_DIRECTORIES | additional include directories |
EXTERNAL_LIBRARIES | external libraries to add to the link command |
EXTRA_TRANSLATE_LANGUAGE | Additionnal extra language to translate the application |
camitk_extension | ( | ) |
Macro camitk_extension simplifies writing a camitk extension (component, action)
The name of the extension is automatically the name of the directory from where this macro is called, unless it is overriden by the TARGET_NAME parameter.
usage:
<type> | = REQUIRED. The selected type of extension you wish to build. |
DISABLED | = means this is a not a default extension, it will not be compiled automatically |
NEEDS_ITK | = add this if your component needs ITK. Do not forget to add the needed list of ITK libraries in the LIBRARIES parameter |
NEEDS_LIBXML2 | = add this if your component needs libxml2 |
NEEDS_XSD | = add this if your action needs Codesynthesis xsd cxx (xml schema compiler) |
NEEDS_OPENCV | = add this if your component needs OpenCV |
NEEDS_IGSTK | = add this if your component needs IgsTK |
NEEDS_XERCESC | = add this if your action / component needs XercesC library |
NEEDS_GDCM | = Add this, if your extension requires GDCM 2.x library |
NEEDS_CEP_LIBRARIES | = list of needed CEP libraries (not external dependencies) |
NEEDS_COMPONENT_EXTENSION | = list of needed component extensions |
NEEDS_ACTION_EXTENSION | = list of needed component extensions |
INCLUDE_DIRECTORIES | = additional include directories |
DEFINES | = list of define flags to add at compilation time. |
CXX_FLAGS | = list of compiler flags to add (such as warning levels (-Wall ...)). |
EXTERNAL_SOURCES | = list of extra source/headers files (external to the current directory) that needed to be added to the SOURCES variable. Note: EXTERNAL_SOURCES are not installed |
EXTERNAL_LIBRARIES | = external libraries to add to the link command |
HEADERS_TO_INSTALL | = list of headers to install, if present this will automatically create an "install-COMPONENT_NAMEcomponent" target, that can be used anywhere else to manage dependencies to this component. The headers are installed ${CAMITK_BUILD_INCLUDE_DIR}/COMPONENT_NAME when the target "install-COMPONENT_NAMEcomponent" is called. |
INSTALL_ALL_HEADERS | = install all of the headers (this is the lazy solution, please consider making a list and using HEADERS_TO_INSTALL parameter instead! |
TARGET_NAME | = specify a target name different than the default (default is the action/component directory name) this can be very useful for example when you have action/component directory in your CEP that has the same name as one in the camitk communityedition. |
CEP_NAME | = specify the CEP_NAME, which is used to categorized the extension for packaging purpose No CEP_NAME provided will result in default categorization (generic extension). |
DESCRIPTION | = Simple description of the extension. Used for packaging presentation for instance. |
EXTRA_TRANSLATE_LANGUAGE | = Additionnal extra language to translate the application |
ENABLE_AUTO_TEST | = Create automatic test with either testactions or testcomponents. By default, auto test are run at the highlest level (level 3) unless AUTO_TEST_LEVEL is specified See also TEST_FILES and AUTO_TEST_LEVEL options |
TEST_FILES | = List of files to use for testing. If provided, only the filenames are required (not the absolute paths), each of them should be found in the testdata build dir. If no test files are provided:
|
AUTO_TEST_LEVEL | i = for automatic test of component extensions: set the highest level of automatic test to perform:
|
camitk_extension_project | ( | ) |
macro camitk_extension_project creates an optional (disabled by default) CEP (CamiTK Extension Project) subdirectory the build.
Usage:
CONTACT | Mandatory, this is the person(s) to contact to get more information about the CEP |
ENABLED | If used, this CEP is forced by default (otherwise the user as to tick the option in CMake GUI or defined a -DCEP_<cepName>:BOOL=TRUE on the command line |
NAME | By default the name of a CEP is given automatically by the name of the top level source directory If you specify a name here, the directory name will be ignored |
DESCRIPTION | A (not so) small description of this CEP (objective, content, implementation information) |
DEFAULT_APPLICATION | The default application to run (for MSVC launchers), default is camitk-imp |
LICENSE | The name of the license for this CEP, default is LGPL-v3 |
ENABLE_TESTING | Enable the testing framework ("make test" will run all the test) |
ENABLE_TEST_COVERAGE | Enable the test coverage report ("make camitk-ce-test-coverage" will run all the test and generate a report in the camitk-ce-test-coverage subdirectory. Only works with the g++ compiler. |
NEEDS_CEP | (TODO) Dependencies to other CEP |
camitk_install_all_headers | ( | ) |
camitk_install_all_headers is a macro that install all header files of a project at build and install time
Duplicate headers installation:
This macro keeps header files directories tree structure at installation. In other words, if your extension has its header files located in subdirectories, this tree structure will be kept the same at installation.
Usage:
COMPONENT | (required) Name of the component to use. This is also the include subdirectory name used for copying the file |
GROUP | (optional) Name of the group this install should be using group will be prepend to the component name. This is either actions, components or libraries. |
Example invocation:
Referenced by camitk_library().
camitk_library | ( | ) |
macro camitk_library simplifies the declaration of a library inside CamiTK and is to be used for all inner project libraries
The name of the CEP library is deduced from the name of the directory, unless LIBNAME is provided
If the library is compiled as shared, it adds the needed library properties If it needs relocation flag fPIC (on some plateforms), this macro should determine if this is the case and specify this flag
usage:
SHARED | optional, if the library should be compiled as shared |
SOURCES | all sources to be included in the library |
INCLUDE_DIRECTORIES | all needed include directories (${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} are automatically added) |
EXTERNAL_LIBRARIES | all the libraries to be used during the link (shared or static) |
NEEDS_CEP_LIBRARIES | all the libraries to be used during the link (shared or static) |
NEEDS_ITK | add this if your component needs ITK. |
NEEDS_LIBXML2 | add this if the CEP library needs libxml2 |
NEEDS_XERCESC | add this if your action / component needs XercesC library |
NEEDS_XSD | add this if your action needs Codesynthesis xsd cxx (xml schema compiler) |
NEEDS_QT | add this if your library depends on Qt 5.x |
NEEDS_CAMITKCORE | add this if your library depends on CamiTK |
LIBNAME | force the CEP library name to be different from the directory it is in |
LINK_DIRECTORIES | additional directories to use in link_directories(...) |
DEFINES | list of define flags to add at compilation time |
PUBLIC | The library is a public library that has to be loaded directly by the operating system. It is generally only needed for SDK library. A public library should not be installed in the lib/${CAMITK_SHORT_VERSION_STRING} but directly in lib/ (on Unix/MacOS) or bin/ (on windows) |
HEADERS_TO_INSTALL | list of header files to install. File would be copied at build and installation time in the ./include/libraries/library-name subdirectory. Note that, if no header files are provided, all header files (*.h) will be install. |
CEP_NAME | specify the CEP_NAME, which is used to categorized the extension for packaging purpose No CEP_NAME provided will result in default categorization (generic extension). |
DESCRIPTION | Simple description of the extension. Used for packaging presentation for instance. |
EXTRA_TRANSLATE_LANGUAGE | Additionnal extra language to translate the application |
CXX_FLAGS | list of compiler flags to add (such as warning levels (-Wall ...)). |
References a, camitk_install_all_headers(), camitk_register_subproject(), camitk_translate(), endif(), export_headers(), get_directory_name(), if(), and include().
camitk_translate | ( | ) |
macro camitk_translate allows to perform the translation of any project (action, component, application and libraries) in several languages.
usage:
EXTRA_LANGUAGE | optional, allows the translation of this additional language |
USE_FLAGS | optional, use the flag directory to associate a flag per language |
Referenced by camitk_library().