Skip to content

Commit

Permalink
doc: Fix doxygen build by copying and patching osdp.h
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Mar 23, 2024
1 parent 51b53a6 commit e13ad95
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@ if(SPHINX_FOUND AND DOXYGEN_FOUND)
get_target_property(LIBOSDP_PUBLIC_HEADER_DIR osdp INTERFACE_INCLUDE_DIRECTORIES)
file(GLOB_RECURSE LIBOSDP_PUBLIC_HEADERS ${LIBOSDP_PUBLIC_HEADER_DIR}/*.h)

set(DOXYGEN_INPUT_DIRS "${CMAKE_SOURCE_DIR}/include/osdp.h ${CMAKE_SOURCE_DIR}/src")
# Copy public header and patch it for doxygen run
configure_file(
${PROJECT_SOURCE_DIR}/include/osdp.h
${CMAKE_CURRENT_BINARY_DIR}/include/osdp.h
COPYONLY
)
execute_process(
COMMAND sed -ie "/^#include <osdp_export.h>$/d" ${CMAKE_CURRENT_BINARY_DIR}/include/osdp.h
COMMAND sed -ie "/^OSDP_EXPORT$/d" ${CMAKE_CURRENT_BINARY_DIR}/include/osdp.h
)

set(DOXYGEN_INPUT_DIRS ${CMAKE_CURRENT_BINARY_DIR}/include/)
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/html/index.html)

Expand Down
1 change: 1 addition & 0 deletions doc/api/control-panel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ Others
.. doxygenfunction:: osdp_cp_get_pd_id

.. doxygenfunction:: osdp_cp_modify_flag

2 changes: 1 addition & 1 deletion doc/osdpctl/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ used to start it.
osdpctl pd-0.cfg stop
Send control commands to an OSDP service
---------------------------------------
----------------------------------------

A command to be sent to a running CP/PD service must be of the following format.
Some of these commands will in-turn be sent by the CP/PD device to its connected
Expand Down

0 comments on commit e13ad95

Please sign in to comment.