forked from eclipse-iceoryx/iceoryx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
132 lines (116 loc) · 5.44 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Copyright (c) 2021 Apex.AI Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.16)
set(IOX_VERSION_STRING "2.95.3")
project(iceoryx_doc VERSION ${IOX_VERSION_STRING})
find_package(Doxygen REQUIRED)
set(DOXYGEN_GENERATE_HTML YES)
set(DOXYGEN_GENERATE_LATEX YES)
set(DOXYGEN_GENERATE_XML YES)
set(DOXYGEN_XML_OUTPUT xml)
# if some header need to be excluded from the exclude pattern have a look at INCLUDE_DIR_AND_ADDITIONAL_FILES below
set(DOXYGEN_EXCLUDE_PATTERNS "*/internal/*")
set(DOXYGEN_EXCLUDE_SYMBOLS "internal::*")
if(EXISTS "/usr/share/plantuml/plantuml.jar")
set(DOXYGEN_PLANTUML_JAR_PATH /usr/share/plantuml/plantuml.jar)
else()
if(DEFINED $ENV{PLANTUML_JAR_PATH})
set(DOXYGEN_PLANTUML_JAR_PATH
"$ENV{PLANTUML_JAR_PATH}"
CACHE STRING "PLANTUML location.")
else()
message(
WARNING
"plantuml.jar not found at '/usr/share/plantuml/', please set environment variable PLANTUML_JAR_PATH to the correct location."
)
endif()
endif()
set(DOXYGEN_ALIASES
[["concurrent=\xrefitem concurrent \"Concurrent\" \"Concurrency\" " \
"req=\xrefitem req \"Requirement\" \"Requirements\" " \
"link=\xrefitem link \"Link\" \"Links\" " \
swcomponent="@par Software Component:" \
error="@par Error Handling:" \
generatedcode="@par Generated by:"]])
set(COMPONENTS iceoryx_platform iceoryx_hoofs iceoryx_posh iceoryx_binding_c
iceoryx_introspection iceoryx_component)
set(COMPONENT_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_platform/generic
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/buffer
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/cli
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/concurrent/buffer
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/concurrent/sync
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/container
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/design
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/filesystem
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/functional
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/legacy/include
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/memory
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/posix/auth
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/posix/desig
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/posix/filesystem
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/posix/ipc
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/posix/sync
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/posix/time
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/posix/utility
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/posix/vocabulary
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/primitives
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/reporting
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/time
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/utility
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_hoofs/vocabulary
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_posh
${CMAKE_CURRENT_SOURCE_DIR}/../../iceoryx_binding_c
${CMAKE_CURRENT_SOURCE_DIR}/../../tools/introspection
${CMAKE_CURRENT_SOURCE_DIR}/example/iceoryx_component)
list(LENGTH COMPONENTS tmp_len)
math(EXPR cmp_len "${tmp_len} - 1")
foreach(val RANGE ${cmp_len})
list(GET COMPONENTS ${val} cmp)
list(GET COMPONENT_DIRS ${val} cmp_dir)
set(DOXYGEN_STRIP_FROM_INC_PATH "${cmp_dir}/include")
set(DOXYGEN_PROJECT_NAME "${cmp}")
message(STATUS "${cmp} ${cmp_dir}")
set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/doc/${cmp})
set(INCLUDE_DIR_AND_ADDITIONAL_FILES ${cmp_dir}/include)
if(${cmp} STREQUAL iceoryx_posh)
list(APPEND INCLUDE_DIR_AND_ADDITIONAL_FILES
${cmp_dir}/include/iceoryx_posh/internal/popo/base_client.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/base_publisher.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/base_server.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/base_subscriber.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/client_impl.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/publisher_impl.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/server_impl.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/subscriber_impl.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/untyped_client_impl.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/untyped_publisher_impl.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/untyped_server_impl.hpp
${cmp_dir}/include/iceoryx_posh/internal/popo/untyped_subscriber_impl.hpp
)
endif()
doxygen_add_docs(doxygen_${cmp}
${INCLUDE_DIR_AND_ADDITIONAL_FILES}
WORKING_DIRECTORY ${cmp_dir}/include
ALL)
endforeach()
# create dummy install directive to generate docu also with "make install"
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.doxygen_iceoryx_hoofs
DESTINATION
${CMAKE_CURRENT_BINARY_DIR}
)