Skip to content

Commit

Permalink
Fix: Don't hardcode qhelpgenerator
Browse files Browse the repository at this point in the history
Use macro instead of hardcord for qhelpgenerator

Log:
  • Loading branch information
hillwoodroc authored and BLumia committed Oct 30, 2023
1 parent 5b5ec11 commit 10ee7e7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dconfig-center/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,22 @@ set (DOXYGEN_FILE_PATTERNS *.cpp *.h *.zh_CN.md *.zh_CN.dox CACHE STRING "Doxyge
set (DOXYGEN_PROJECT_NUMBER ${CMAKE_PROJECT_VERSION} CACHE STRING "") # Should be the same as this project is using.
set (DOXYGEN_EXTRACT_STATIC YES)
set (DOXYGEN_OUTPUT_LANGUAGE "Chinese")
set (DOXYGEN_QHG_LOCATION "qhelpgenerator" CACHE STRING "Doxygen QHG path")
set (DOXYGEN_QCH_FILE "dde-dconfig-doc.qch")
set (DOXYGEN_QHP_VIRTUAL_FOLDER "dde-dconfig-doc")
set (DOXYGEN_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/docs/)

if("${QT_VERSION_MAJOR}" STREQUAL "5")
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Help)
else()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ToolsTools)
endif()
get_target_property(_qhelpgenerator_location Qt${QT_VERSION_MAJOR}::qhelpgenerator IMPORTED_LOCATION)

if("${_qhelpgenerator_location}" STREQUAL "")
set(_qhelpgenerator_location "qhelpgenerator")
endif()
set (DOXYGEN_QHG_LOCATION ${_qhelpgenerator_location} CACHE STRING "Doxygen QHG path")

set (DOXYGEN_HTML_EXTRA_STYLESHEET "" CACHE STRING "Doxygen custom stylesheet for HTML output")
set (DOXYGEN_TAGFILES "qtcore.tags=qthelp://org.qt-project.qtcore/qtcore/" CACHE STRING "Doxygen tag files")
set (DOXYGEN_IMAGE_PATH ${PROJECT_SOURCE_DIR}/docs/src)
Expand Down

0 comments on commit 10ee7e7

Please sign in to comment.