QGIS/doc/CMakeLists.txt

182 lines
6.7 KiB
CMake
Raw Normal View History

# include doxygen documentation
2020-11-11 11:15:34 +01:00
set (WITH_APIDOC FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built")
# include Qt documentation
2020-11-11 11:15:34 +01:00
set (QT_DOC_URL "https://doc.qt.io/qt-5/" CACHE STRING "URL for Qt docs")
2020-11-11 11:15:34 +01:00
set(QGIS_DOC_FILES
2020-06-12 08:18:19 +02:00
../INSTALL.md
../NEWS.md
2020-06-10 13:57:27 +02:00
NEWS.html
2019-10-26 13:36:31 +02:00
index.html
developersmap.html
nohelp.html
favicon.ico
style.css
AUTHORS
CONTRIBUTORS
SPONSORS
DONORS
TRANSLATORS
LICENSE
)
2020-11-11 11:15:34 +01:00
install(FILES ${QGIS_DOC_FILES} DESTINATION ${QGIS_DATA_DIR}/doc)
install(FILES ../images/icons/qgis-icon-60x60.png DESTINATION ${QGIS_DATA_DIR}/doc/images)
# Sponsor images
2020-11-11 11:15:34 +01:00
file (GLOB SPONSOR_IMAGES images/projects/thumbnails/* )
install (FILES ${SPONSOR_IMAGES} DESTINATION ${QGIS_DATA_DIR}/doc/images/projects/thumbnails/)
2020-11-11 11:15:34 +01:00
if(WITH_APIDOC)
find_package(Doxygen 1.8.2 REQUIRED)
if(DOXYGEN_FOUND)
set(QHP_FILES ${CMAKE_CURRENT_BINARY_DIR}/api/html/index.qhp)
# Whether to generate QHP file
2020-11-11 11:15:34 +01:00
set (GENERATE_QHP FALSE CACHE BOOL "Determines whether to generate Qt QHP help from the QGIS API Docs")
if (GENERATE_QHP)
set(WITH_QHP YES)
set(QHP_FILES ${QHP_FILES} ${CMAKE_CURRENT_BINARY_DIR}/api/qch/qgis.qch)
else()
set(WITH_QHP NO)
endif()
set(DOXYGEN_INCLUDE_PATH
${CMAKE_SOURCE_DIR}/src/core
)
2020-11-11 11:15:34 +01:00
string(REPLACE ";" " " DOXYGEN_INCLUDE_PATH "${DOXYGEN_INCLUDE_PATH}")
2020-11-11 11:15:34 +01:00
set(DOXYGEN_INPUT
${CMAKE_SOURCE_DIR}/doc
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/3d
${CMAKE_SOURCE_DIR}/src/core/annotations
${CMAKE_SOURCE_DIR}/src/core/auth
2019-07-10 17:46:35 +10:00
${CMAKE_SOURCE_DIR}/src/core/callouts
2019-09-02 09:48:46 +02:00
${CMAKE_SOURCE_DIR}/src/core/classification
${CMAKE_SOURCE_DIR}/src/core/diagram
${CMAKE_SOURCE_DIR}/src/core/dxf
${CMAKE_SOURCE_DIR}/src/core/effects
2018-04-02 22:46:47 +02:00
${CMAKE_SOURCE_DIR}/src/core/expression
${CMAKE_SOURCE_DIR}/src/core/fieldformatter
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/geocms
${CMAKE_SOURCE_DIR}/src/core/geocms/geonode
2020-10-30 09:27:22 +10:00
${CMAKE_SOURCE_DIR}/src/core/geocoding
${CMAKE_SOURCE_DIR}/src/core/gps
${CMAKE_SOURCE_DIR}/src/core/labeling
${CMAKE_SOURCE_DIR}/src/core/layertree
${CMAKE_SOURCE_DIR}/src/core/layout
${CMAKE_SOURCE_DIR}/src/core/locator
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/core/mesh
${CMAKE_SOURCE_DIR}/src/core/numericformats
${CMAKE_SOURCE_DIR}/src/core/pal
${CMAKE_SOURCE_DIR}/src/core/processing
2020-10-20 11:03:58 +02:00
${CMAKE_SOURCE_DIR}/src/core/pointcloud
${CMAKE_SOURCE_DIR}/src/core/providers
${CMAKE_SOURCE_DIR}/src/core/providers/memory
${CMAKE_SOURCE_DIR}/src/core/raster
${CMAKE_SOURCE_DIR}/src/core/scalebar
2017-08-06 13:39:03 +02:00
${CMAKE_SOURCE_DIR}/src/core/symbology
2020-05-12 08:31:14 +10:00
${CMAKE_SOURCE_DIR}/src/core/textrenderer
${CMAKE_SOURCE_DIR}/src/core/validity
${CMAKE_SOURCE_DIR}/src/core/vectortile
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_SOURCE_DIR}/src/gui/attributetable
2019-07-10 17:46:35 +10:00
${CMAKE_SOURCE_DIR}/src/gui/callouts
${CMAKE_SOURCE_DIR}/src/gui/codeeditors
${CMAKE_SOURCE_DIR}/src/gui/devtools
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
${CMAKE_SOURCE_DIR}/src/gui/effects
${CMAKE_SOURCE_DIR}/src/gui/labeling
${CMAKE_SOURCE_DIR}/src/gui/layertree
2018-10-24 07:48:39 -04:00
${CMAKE_SOURCE_DIR}/src/gui/layout
${CMAKE_SOURCE_DIR}/src/gui/locator
2020-01-07 10:41:55 +10:00
${CMAKE_SOURCE_DIR}/src/gui/numericformats
${CMAKE_SOURCE_DIR}/src/gui/ogr
2020-10-20 11:03:58 +02:00
${CMAKE_SOURCE_DIR}/src/gui/pointcloud
2018-02-01 07:21:00 +10:00
${CMAKE_SOURCE_DIR}/src/gui/processing
${CMAKE_SOURCE_DIR}/src/gui/processing/models
${CMAKE_SOURCE_DIR}/src/gui/raster
2017-08-06 13:39:03 +02:00
${CMAKE_SOURCE_DIR}/src/gui/symbology
${CMAKE_SOURCE_DIR}/src/gui/vectortile
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/mesh
${CMAKE_SOURCE_DIR}/src/analysis/interpolation
${CMAKE_SOURCE_DIR}/src/analysis/network
${CMAKE_SOURCE_DIR}/src/analysis/processing
${CMAKE_SOURCE_DIR}/src/analysis/raster
${CMAKE_SOURCE_DIR}/src/analysis/vector
${CMAKE_SOURCE_DIR}/src/analysis/vector/geometry_checker
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain
${CMAKE_SOURCE_DIR}/src/plugins
${CMAKE_SOURCE_DIR}/src/quickgui
${CMAKE_SOURCE_DIR}/src/quickgui/plugin
)
2020-11-11 11:15:34 +01:00
if(WITH_SERVER)
set(DOXYGEN_INPUT
${DOXYGEN_INPUT}
2018-07-07 21:49:26 +01:00
${CMAKE_SOURCE_DIR}/src/server/
${CMAKE_SOURCE_DIR}/src/server/services/
${CMAKE_SOURCE_DIR}/src/server/services/wms
${CMAKE_SOURCE_DIR}/src/server/services/wfs
${CMAKE_SOURCE_DIR}/src/server/services/wcs
)
2020-11-11 11:15:34 +01:00
endif()
set(DOXYGEN_FILE_PATTERNS *.h *.cpp *.dox)
set(DOXYGEN_FILES)
foreach(_dir ${DOXYGEN_INPUT})
foreach(_pattern ${DOXYGEN_FILE_PATTERNS})
file(GLOB_RECURSE _files ${_dir}/${_pattern})
list(APPEND DOXYGEN_FILES ${_files})
endforeach(_pattern)
endforeach(_dir)
string(REPLACE ";" " " DOXYGEN_INPUT "${DOXYGEN_INPUT}")
if(WERROR)
set (DOXYGEN_WARN_AS_ERROR "YES")
else()
set (DOXYGEN_WARN_AS_ERROR "NO")
endif()
configure_file(${CMAKE_SOURCE_DIR}/cmake_templates/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
set (DOXYGEN_ON_DEMAND FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be built on demand through the target apidoc only. If set to false it is added to the target ALL.")
if(DOXYGEN_ON_DEMAND)
add_custom_target(apidoc DEPENDS ${QHP_FILES} version)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${QGIS_DATA_DIR}/doc/api OPTIONAL)
else()
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api/html/ DESTINATION ${QGIS_DATA_DIR}/doc/api)
add_custom_target(apidoc ALL DEPENDS ${QHP_FILES} version)
endif()
add_custom_command(
OUTPUT ${QHP_FILES}
DEPENDS ${DOXYGEN_FILES}
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation" VERBATIM)
2020-11-11 11:15:34 +01:00
install(FILES ../images/icons/qgis-icon-60x60.png DESTINATION ${QGIS_DATA_DIR}/doc/api)
if(GENERATE_QHP)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/api/qch/qgis.qch DESTINATION ${QGIS_DATA_DIR}/doc/api)
endif()
set(WITH_DOT YES CACHE STRING "Determines if the dot application should be used to generate class diagrams for the documentation")
mark_as_advanced(WITH_DOT)
else()
message(STATUS "QGIS api documentation not built - Doxygen not found")
endif()
endif()
#SUBDIRS (images plugins install_guide)