summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEmanoil Kotsev <deloptes@gmail.com>2023-05-17 08:00:37 +0000
committerEmanoil Kotsev <deloptes@gmail.com>2023-05-17 20:57:03 +0000
commite0a77280fd3a0a53671d8e7f669daa29f7fe4713 (patch)
treead799e97b3ec3ebc6f9cbd10650e85e56e2da867 /CMakeLists.txt
parent1d2fcc9551cd0415d50b1a437b89a0ccbcd15727 (diff)
downloadtdebluez-e0a77280fd3a0a53671d8e7f669daa29f7fe4713.tar.gz
tdebluez-e0a77280fd3a0a53671d8e7f669daa29f7fe4713.zip
Add cmake rules for building tdebluez api docs
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
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