summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanoil Kotsev <deloptes@gmail.com>2025-06-29 08:53:08 +0000
committerEmanoil Kotsev <deloptes@gmail.com>2025-07-04 23:13:04 +0000
commit5f50c3ce23fcfbb0c00c8029e13697fc51ad1d4c (patch)
treee14ee0c8d9b61ae137834d3f2fca8f77e1b456f2
parent7425488d4db6656dd505c6f52d80e0490f0d27e9 (diff)
downloadtdebluez-feat/apidocs.tar.gz
tdebluez-feat/apidocs.zip
Generating apidocs with the new macro tde_add_project_apidocs()feat/apidocs
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
-rw-r--r--CMakeLists.txt34
-rw-r--r--tdebluez.Doxyfile.cmake4
2 files changed, 7 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d436017..e5f2aec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,12 +46,6 @@ if( NOT DBUS_SYS_DIR )
set( DBUS_SYS_DIR ${SYSCONF_INSTALL_DIR}/dbus-1/system.d )
endif( )
-if( CMAKE_APIDOX_HTML_DIRECTORY )
- set( APIDOX_HTML_DIRECTORY "${CMAKE_APIDOX_HTML_DIRECTORY}" )
-else()
- set( APIDOX_HTML_DIRECTORY "/usr/share/doc/${PROJECT_NAME}-trinity-api/HTML" )
-endif()
-
##### optional stuff ############################
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
@@ -64,6 +58,7 @@ option( BUILD_LIBTDEBLUEZ "Build libtdebluez" ${BUILD_ALL} )
option( BUILD_TDEIOSLAVE "Build tdeioslave" ${BUILD_ALL} )
option( BUILD_DOC "Build doc" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
+option( BUILD_APIDOX "Build documentation for developers" ${BUILD_ALL} )
##### configure checks ##########################
@@ -94,29 +89,10 @@ add_subdirectory( src/tdebluezauth )
tde_conditional_add_project_docs( BUILD_DOC )
tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
+if( BUILD_APIDOX )
+ tde_add_project_apidocs()
+endif()
+
##### write configure files #####################
configure_file( config.h.cmake config.h @ONLY )
-
-configure_file( ${CMAKE_SOURCE_DIR}/tdebluez.Doxyfile.cmake ${CMAKE_BINARY_DIR}/tdebluez.Doxyfile )
-
-##### add apidox targets ############
-
-add_custom_target( apidox
- COMMAND doxygen ${CMAKE_BINARY_DIR}/tdebluez.Doxyfile
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- DEPENDS tdebluez-shared tdeobex-shared
-)
-
-add_custom_target( install-apidox
- COMMAND ${CMAKE_COMMAND} -E echo Apidox installed in ${APIDOX_HTML_DIRECTORY}
-)
-
-install( CODE "
- if( EXISTS ${CMAKE_BINARY_DIR}/apidocs )
- file(
- INSTALL ${CMAKE_BINARY_DIR}/apidocs/html
- DESTINATION ${APIDOX_HTML_DIRECTORY}/en
- )
- endif()"
-) \ No newline at end of file
diff --git a/tdebluez.Doxyfile.cmake b/tdebluez.Doxyfile.cmake
index b10f27b..37b7b4c 100644
--- a/tdebluez.Doxyfile.cmake
+++ b/tdebluez.Doxyfile.cmake
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = tdebluez
+PROJECT_NAME = ${APIDOX_PROJECT_NAME}
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
@@ -38,7 +38,7 @@ PROJECT_NUMBER =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = apidocs
+OUTPUT_DIRECTORY = ${APIDOX_OUTPUT_DIR}
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output