Changeset View
Changeset View
Standalone View
Standalone View
modules/ECMAddQch.cmake
Show All 14 Lines | |||||
15 | # VERSION <version> | 15 | # VERSION <version> | ||
16 | # QCH_INSTALL_DESTINATION <qchfile_install_path> | 16 | # QCH_INSTALL_DESTINATION <qchfile_install_path> | ||
17 | # TAGFILE_INSTALL_DESTINATION <tagsfile_install_path> | 17 | # TAGFILE_INSTALL_DESTINATION <tagsfile_install_path> | ||
18 | # [COMPONENT <component>] | 18 | # [COMPONENT <component>] | ||
19 | # [BASE_NAME <basename>] | 19 | # [BASE_NAME <basename>] | ||
20 | # [SOURCE_DIRS <dir> [<dir2> [...]]] | 20 | # [SOURCE_DIRS <dir> [<dir2> [...]]] | ||
21 | # [SOURCES <file> [<file2> [...]]] | 21 | # [SOURCES <file> [<file2> [...]]] | ||
22 | # |MD_MAINPAGE <md_file>] | 22 | # |MD_MAINPAGE <md_file>] | ||
23 | # [INCLUDE_DIRS <incdir> [<incdir2> [...]]] | ||||
23 | # [IMAGE_DIRS <idir> [<idir2> [...]]] | 24 | # [IMAGE_DIRS <idir> [<idir2> [...]]] | ||
24 | # [EXAMPLE_DIRS <edir> [<edir2> [...]]] | 25 | # [EXAMPLE_DIRS <edir> [<edir2> [...]]] | ||
25 | # [ORG_DOMAIN <domain>] | 26 | # [ORG_DOMAIN <domain>] | ||
26 | # [NAMESPACE <namespace>] | 27 | # [NAMESPACE <namespace>] | ||
27 | # [LINK_QCHS <qch> [<qch2> [...]]] | 28 | # [LINK_QCHS <qch> [<qch2> [...]]] | ||
28 | # [PREDEFINED_MACROS <macro[=content]> [<macro2[=content]> [...]]] | 29 | # [PREDEFINED_MACROS <macro[=content]> [<macro2[=content]> [...]]] | ||
29 | # [BLANK_MACROS <macro> [<macro2> [...]]] | 30 | # [BLANK_MACROS <macro> [<macro2> [...]]] | ||
30 | # [CONFIG_TEMPLATE <configtemplate_file>] | 31 | # [CONFIG_TEMPLATE <configtemplate_file>] | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
74 | # SOURCES specifies the source files for which the API documentation should be | 75 | # SOURCES specifies the source files for which the API documentation should be | ||
75 | # generated. | 76 | # generated. | ||
76 | # Needs to be used when SOURCE_DIRS or CONFIG_TEMPLATE are not used. | 77 | # Needs to be used when SOURCE_DIRS or CONFIG_TEMPLATE are not used. | ||
77 | # | 78 | # | ||
78 | # MD_MAINPAGE specifies a file in Markdown format that should be used as main | 79 | # MD_MAINPAGE specifies a file in Markdown format that should be used as main | ||
79 | # page. This page will overrule any ``\mainpage`` command in the included | 80 | # page. This page will overrule any ``\mainpage`` command in the included | ||
80 | # sources. | 81 | # sources. | ||
81 | # | 82 | # | ||
83 | # INCLUDE_DIRS specifies the dirs which should be searched for included | ||||
84 | # headers. Dirs can be relative to the current source dir. Since 5.63. | ||||
85 | # | ||||
82 | # IMAGE_DIRS specifies the dirs which contain images that are included in the | 86 | # IMAGE_DIRS specifies the dirs which contain images that are included in the | ||
83 | # documentation. Dirs can be relative to the current source dir. | 87 | # documentation. Dirs can be relative to the current source dir. | ||
84 | # | 88 | # | ||
85 | # EXAMPLE_DIRS specifies the dirs which contain examples that are included in | 89 | # EXAMPLE_DIRS specifies the dirs which contain examples that are included in | ||
86 | # the documentation. Dirs can be relative to the current source dir. | 90 | # the documentation. Dirs can be relative to the current source dir. | ||
87 | # | 91 | # | ||
88 | # QCH_INSTALL_DESTINATION specifies where the generated QCH file will be | 92 | # QCH_INSTALL_DESTINATION specifies where the generated QCH file will be | ||
89 | # installed. | 93 | # installed. | ||
▲ Show 20 Lines • Show All 308 Lines • ▼ Show 20 Line(s) | 352 | function(_ecm_collect_linkable_qch_targets name) | |||
398 | set(${name} ${_good_qchs} PARENT_SCOPE) | 402 | set(${name} ${_good_qchs} PARENT_SCOPE) | ||
399 | endfunction() | 403 | endfunction() | ||
400 | 404 | | |||
401 | 405 | | |||
402 | function(ecm_add_qch target_name) | 406 | function(ecm_add_qch target_name) | ||
403 | # Parse arguments | 407 | # Parse arguments | ||
404 | set(options VERBOSE) | 408 | set(options VERBOSE) | ||
405 | set(oneValueArgs NAME BASE_NAME QCH_INSTALL_DESTINATION TAGFILE_INSTALL_DESTINATION COMPONENT VERSION NAMESPACE MD_MAINPAGE ORG_DOMAIN CONFIG_TEMPLATE) | 409 | set(oneValueArgs NAME BASE_NAME QCH_INSTALL_DESTINATION TAGFILE_INSTALL_DESTINATION COMPONENT VERSION NAMESPACE MD_MAINPAGE ORG_DOMAIN CONFIG_TEMPLATE) | ||
406 | set(multiValueArgs SOURCE_DIRS SOURCES IMAGE_DIRS EXAMPLE_DIRS PREDEFINED_MACROS BLANK_MACROS LINK_QCHS) | 410 | set(multiValueArgs SOURCE_DIRS SOURCES INCLUDE_DIRS IMAGE_DIRS EXAMPLE_DIRS PREDEFINED_MACROS BLANK_MACROS LINK_QCHS) | ||
407 | cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | 411 | cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
408 | 412 | | |||
409 | # check required args | 413 | # check required args | ||
410 | foreach(_arg_name NAME QCH_INSTALL_DESTINATION TAGFILE_INSTALL_DESTINATION VERSION) | 414 | foreach(_arg_name NAME QCH_INSTALL_DESTINATION TAGFILE_INSTALL_DESTINATION VERSION) | ||
411 | if(NOT DEFINED ARGS_${_arg_name}) | 415 | if(NOT DEFINED ARGS_${_arg_name}) | ||
412 | message(FATAL_ERROR "${_arg_name} needs to be defined when calling ecm_add_qch") | 416 | message(FATAL_ERROR "${_arg_name} needs to be defined when calling ecm_add_qch") | ||
413 | endif() | 417 | endif() | ||
414 | endforeach() | 418 | endforeach() | ||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 457 | else() | |||
482 | else() | 486 | else() | ||
483 | set(_doxygenconfig_template_file "${ECM_MODULE_DIR}/ECMQchDoxygen.config.in") | 487 | set(_doxygenconfig_template_file "${ECM_MODULE_DIR}/ECMQchDoxygen.config.in") | ||
484 | endif() | 488 | endif() | ||
485 | set(_doxygen_layout_file "${ECM_MODULE_DIR}/ECMQchDoxygenLayout.xml") | 489 | set(_doxygen_layout_file "${ECM_MODULE_DIR}/ECMQchDoxygenLayout.xml") | ||
486 | # Setup variables used in config file template, ECM_QCH_DOXYGEN_* | 490 | # Setup variables used in config file template, ECM_QCH_DOXYGEN_* | ||
487 | set(ECM_QCH_DOXYGEN_OUTPUTDIR "\"${_apidox_builddir}\"") | 491 | set(ECM_QCH_DOXYGEN_OUTPUTDIR "\"${_apidox_builddir}\"") | ||
488 | set(ECM_QCH_DOXYGEN_TAGFILE "\"${_tags_buildpath}\"") | 492 | set(ECM_QCH_DOXYGEN_TAGFILE "\"${_tags_buildpath}\"") | ||
489 | set(ECM_QCH_DOXYGEN_LAYOUTFILE "\"${_doxygen_layout_file}\"") | 493 | set(ECM_QCH_DOXYGEN_LAYOUTFILE "\"${_doxygen_layout_file}\"") | ||
494 | set(ECM_QCH_DOXYGEN_INCLUDE_PATH) | ||||
495 | foreach(_include_DIR IN LISTS ARGS_INCLUDE_DIRS) | ||||
496 | if (NOT IS_ABSOLUTE ${_include_DIR}) | ||||
497 | set(_include_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${_include_DIR}") | ||||
498 | endif() | ||||
499 | # concat dirs separated by a break, it is no issue that first has also a leading break | ||||
500 | set(ECM_QCH_DOXYGEN_INCLUDE_PATH "${ECM_QCH_DOXYGEN_INCLUDE_PATH} \\\n\"${_include_DIR}\"") | ||||
501 | endforeach() | ||||
490 | set(ECM_QCH_DOXYGEN_IMAGEDIRS) | 502 | set(ECM_QCH_DOXYGEN_IMAGEDIRS) | ||
491 | foreach(_image_DIR IN LISTS ARGS_IMAGE_DIRS) | 503 | foreach(_image_DIR IN LISTS ARGS_IMAGE_DIRS) | ||
492 | if (NOT IS_ABSOLUTE ${_image_DIR}) | 504 | if (NOT IS_ABSOLUTE ${_image_DIR}) | ||
493 | set(_image_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${_image_DIR}") | 505 | set(_image_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${_image_DIR}") | ||
494 | endif() | 506 | endif() | ||
495 | # concat dirs separated by a break, it is no issue that first has also a leading break | 507 | # concat dirs separated by a break, it is no issue that first has also a leading break | ||
496 | set(ECM_QCH_DOXYGEN_IMAGEDIRS "${ECM_QCH_DOXYGEN_IMAGEDIRS} \\\n\"${_image_DIR}\"") | 508 | set(ECM_QCH_DOXYGEN_IMAGEDIRS "${ECM_QCH_DOXYGEN_IMAGEDIRS} \\\n\"${_image_DIR}\"") | ||
497 | endforeach() | 509 | endforeach() | ||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |