summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEmanoil Kotsev <[email protected]>2023-05-17 08:00:37 +0000
committerMichele Calgaro <[email protected]>2023-05-23 10:46:19 +0900
commit83438b8e102d19834037e5dc9f8217e46f54f38a (patch)
tree7ed363d8e056f91c0a1f0dab4169d5210967089d /CMakeLists.txt
parent5c37f6a674883a2a5cfb11c3b6ec39d2cea8cde2 (diff)
downloadtdebluez-83438b8e102d19834037e5dc9f8217e46f54f38a.tar.gz
tdebluez-83438b8e102d19834037e5dc9f8217e46f54f38a.zip
Add cmake rules for building tdebluez api docs
Signed-off-by: Emanoil Kotsev <[email protected]> (cherry picked from commit e0a77280fd3a0a53671d8e7f669daa29f7fe4713)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt38
1 files changed, 28 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 02c2c73..e6a7756 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,21 +46,17 @@ if( NOT DBUS_SYS_DIR )
set( DBUS_SYS_DIR ${SYSCONF_INSTALL_DIR}/dbus-1/system.d )
endif( )
-##### add apidox targets ############
-add_custom_target(apidox
- COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/tdebluez/doc/html"
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
-
-add_custom_target(install-apidox
- COMMAND "./install_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}"
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
+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 )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
-
##### user requested modules ####################
option( BUILD_ALL "Build all" OFF )
@@ -98,7 +94,29 @@ add_subdirectory( src/tdebluezauth )
tde_conditional_add_project_docs( BUILD_DOC )
tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
-
##### 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