Skip to content

Commit

Permalink
feat(doc): add package for doc
Browse files Browse the repository at this point in the history
build the package for doc

Log: build package of doc
  • Loading branch information
Decodetalkers authored and kegechen committed Aug 29, 2022
1 parent 9cdc9e7 commit d0c66b0
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ else ()
endif ()

if (BUILD_DOCS)
add_subdirectory(doc)
add_subdirectory(docs)
endif ()

add_subdirectory(src)
Expand Down
3 changes: 2 additions & 1 deletion archlinux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ build() {
cmake -GNinja \
-DNOTPACKAGE=OFF \
-DLINUXNAME="archlinux"\
-DBUILD_DOCS=OFF \
-DBUILD_DOCS=ON \
-DQCH_INSTALL_DESTINATION=/usr/share/doc/qt \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release
Expand Down
10 changes: 9 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: libdevel
Priority: optional
Maintainer: Deepin Packages Builder <[email protected]>
Build-Depends: debhelper (>= 9), pkg-config,
qttools5-dev-tools, qtbase5-private-dev,
qttools5-dev-tools, qtbase5-private-dev, doxygen,
libgsettings-qt-dev, libgtest-dev, libdtkcommon-dev, cmake
Standards-Version: 3.9.8

Expand Down Expand Up @@ -32,3 +32,11 @@ Description: Deepin Tool Kit Core Devel library
DtkCore is base devel library of Deepin Qt/C++ applications.
.
This package contains the header files and static libraries of DtkCore

Package: libdtkcore-doc
Architecture: any
Description: Deepin Tool Kit Core (document)
DtkCore is base devel library of Deepin Qt/C++ applications.
.
This package contains the doc files of DtkCore

1 change: 1 addition & 0 deletions debian/libdtkcore-doc.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/qt5/doc/dtkcore.qch
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-
dh $@ --parallel

override_dh_auto_configure:
dh_auto_configure -- -DNOTPACKAGE=OFF -DBUILD_DOCS=OFF -DBUILD_VERSION=$(BUILD_VER) -DDVERSION=$(PACK_VER)
dh_auto_configure -- -DNOTPACKAGE=OFF -DBUILD_DOCS=ON -DBUILD_VERSION=$(BUILD_VER) -DDVERSION=$(PACK_VER)

#override_dh_auto_test:
# echo "skip auto test"
Expand Down
11 changes: 5 additions & 6 deletions doc/CMakeLists.txt → docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ cmake_minimum_required (VERSION 3.10)

find_package (Doxygen REQUIRED)

set (QCH_INSTALL_DESTINATION ${CMAKE_INSTALLL_PREFIX}/share/DDE/dtk CACHE STRING "QCH install location")
set (QCH_INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/qt5/doc CACHE STRING "QCH install location")

set (DOXYGEN_GENERATE_HTML "NO" CACHE STRING "Doxygen HTML output")
set (DOXYGEN_GENERATE_XML "NO" CACHE STRING "Doxygen XML output")
set (DOXYGEN_GENERATE_QHP "YES" CACHE STRING "Doxygen QHP output")
set (DOXYGEN_GENERATE_HTML YES CACHE STRING "Doxygen HTML output")
set (DOXYGEN_GENERATE_XML YES CACHE STRING "Doxygen XML output")
set (DOXYGEN_GENERATE_QHP YES CACHE STRING "Doxygen QHP output")
set (DOXYGEN_FILE_PATTERNS *.cpp *.h *.zh_CN.md *.zh_CN.dox CACHE STRING "Doxygen File Patterns")
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_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/docs/)
set (DOXYGEN_QHG_LOCATION "qhelpgenerator")
set (DOXYGEN_QHP_NAMESPACE "org.deepin.dtk.core")
set (DOXYGEN_QCH_FILE "dtkcore.qch")
Expand All @@ -30,7 +29,7 @@ set (DOXYGEN_EXPAND_ONLY_PREDEF "YES")
doxygen_add_docs (doxygen
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/doc
${PROJECT_SOURCE_DIR}/docs
ALL
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate documentation via Doxygen"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d0c66b0

Please sign in to comment.