Use CMake rules instead of calling external shell scripts

generate_apidox and install_apidox from the cmake submodule folder.

After generating apidox, links pointing to build directory are fixed.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 7d49623d4f)
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
r14.0.x
Slávek Banko 4 years ago
parent 1786157637
commit 1e1ca5afa1
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -45,13 +45,42 @@ tde_setup_paths( )
##### add apidox targets ############ ##### add apidox targets ############
if( "${CMAKE_VERSION}" VERSION_LESS "3.1" )
set( CMAKE_ENV "env" )
else()
set( CMAKE_ENV "${CMAKE_COMMAND};-E;env" )
endif()
add_custom_target( apidox add_custom_target( apidox
COMMAND "./generate_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "/usr/share/qt3/doc/html" COMMAND ${CMAKE_ENV}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/") "QTDOCDIR=/usr/share/tqt3/doc/html"
"DOXDATA=${HTML_INSTALL_DIR}/en/common"
${CMAKE_SOURCE_DIR}/admin/doxygen.sh
--no-modulename
${CMAKE_SOURCE_DIR}
COMMAND
find ${CMAKE_BINARY_DIR}/apidocs -name '*.html' |
xargs -r sed -i 's|${CMAKE_BINARY_DIR}/apidocs|${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs|g'
COMMAND
find ${CMAKE_BINARY_DIR}/apidocs -name '*.tag' |
xargs -r sed -i 's|${CMAKE_SOURCE_DIR}/|${PROJECT_NAME}/|g'
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
add_custom_target( install-apidox add_custom_target( install-apidox
COMMAND "./install_apidox" "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${HTML_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}" COMMAND ${CMAKE_COMMAND} -E echo Apidox installed in ${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/") )
install( CODE "
if( EXISTS ${CMAKE_BINARY_DIR}/apidocs )
file(
INSTALL ${CMAKE_BINARY_DIR}/apidocs/
DESTINATION ${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs
PATTERN doxygen_sqlite3.db EXCLUDE
PATTERN installdox-slow EXCLUDE
)
endif()"
)
##### optional stuff ############################ ##### optional stuff ############################

Loading…
Cancel
Save