diff options
author | Emanoil Kotsev <deloptes@gmail.com> | 2025-06-25 13:56:23 +0000 |
---|---|---|
committer | Emanoil Kotsev <deloptes@gmail.com> | 2025-07-11 00:42:48 +0000 |
commit | ccee564ea0e6d9c13127c170068f9364e41d7f89 (patch) | |
tree | 9caa0dc67a0764ca92c9a27f8cb53f1f353b2e9e | |
parent | 8bc7bd5e9e885fc26ff398602970b189e8c490c3 (diff) | |
download | dbus-1-tqt-feat/apidocs.tar.gz dbus-1-tqt-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.txt | 21 | ||||
-rw-r--r-- | dbus-1-tqt.Doxyfile.cmake | 6 | ||||
-rw-r--r-- | src/CMakeLists.txt | 20 |
3 files changed, 13 insertions, 34 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f09103c..8fd7ade 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,11 +30,16 @@ include( CheckSymbolExists ) include( TDEMacros ) +##### setup install paths ####################### + +include( TDESetupPaths ) +tde_setup_paths( ) ##### optional stuff option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) +option( BUILD_APIDOX "Build documentation for developers" ${WITH_ALL_OPTIONS} ) ##### configure checks ########################## @@ -72,19 +77,13 @@ add_definitions( ${TQT_CFLAGS_OTHER} ) -if( CMAKE_APIDOX_HTML_DIRECTORY ) - set( APIDOX_HTML_DIRECTORY "${CMAKE_APIDOX_HTML_DIRECTORY}" ) -else() - set( APIDOX_HTML_DIRECTORY "/usr/share/doc/lib${PROJECT_NAME}/HTML" ) -endif() +##### build apidox ######################## +if( BUILD_APIDOX ) + set( APIDOX_HTML_DIR "/usr/share/doc/lib${PROJECT_NAME}/HTML/en" ) + tde_add_project_apidocs() +endif() ##### source directories ######################## add_subdirectory( src ) - - -##### write configure files ##################### - -configure_file( ${CMAKE_SOURCE_DIR}/dbus-1-tqt.Doxyfile.cmake ${CMAKE_BINARY_DIR}/dbus-1-tqt.Doxyfile ) - diff --git a/dbus-1-tqt.Doxyfile.cmake b/dbus-1-tqt.Doxyfile.cmake index d725e49..6ef1858 100644 --- a/dbus-1-tqt.Doxyfile.cmake +++ b/dbus-1-tqt.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 = DBus-1-TQt +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 = 1.0 # 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 @@ -582,7 +582,7 @@ WARN_LOGFILE = # ./include \ # ./scripts -INPUT = ${CMAKE_SOURCE_DIR}/src +INPUT = ${APIDOX_SOURCE_DIR}/src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c09379a..8207ed7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -58,23 +58,3 @@ tde_add_executable( dbusxml2qt3 DESTINATION ${BIN_INSTALL_DIR} ) - -##### add apidox targets ############ - -add_custom_target( apidox - COMMAND doxygen ${CMAKE_BINARY_DIR}/dbus-1-tqt.Doxyfile - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} -) - -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/ - DESTINATION ${APIDOX_HTML_DIRECTORY}/en - ) - endif()" -) |