Skip to content

Commit

Permalink
fix: use external searching
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Aug 6, 2024
1 parent 7987894 commit fce978a
Show file tree
Hide file tree
Showing 8 changed files with 3,094 additions and 1 deletion.
1 change: 1 addition & 0 deletions .doxyconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a dummy file, used by CMakeLists.txt
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Ignore JetBrains IDE files
.idea/

# Ignore build directories
build/
cmake-build-*/

# npm
node_modules/
package-lock.json

# ignore doxyconfig files
docs/*doxyconfig*

# ignore fake third-party directory
third-party/
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cmake_minimum_required(VERSION 3.18)

# find doxygen and graphviz
find_package(Doxygen 1.10 REQUIRED dot) # debian and ubuntu left in the dust

Expand Down Expand Up @@ -25,11 +27,19 @@ file(MAKE_DIRECTORY "${DOXYGEN_BUILD_DIR_CMAKE}/html")
# copy files to build directory
file(COPY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/header.html" "${SOURCE_DOCS_DIR}/header-doxyconfig.html")
file(COPY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile" "${SOURCE_DOCS_DIR}/Doxyfile-doxyconfig")
file(COPY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/doxyconfig.css" "${SOURCE_DOCS_DIR}/doxyconfig.css")
file(COPY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/search.js" "${SOURCE_DOCS_DIR}/search-doxyconfig.js")

# append the "${SOURCE_DOCS_DIR}/Doxyfile to the Doxyfile-doxyconfig
file(READ "${SOURCE_DOCS_DIR}/Doxyfile" DOXYFILE_CONTENTS)
file(APPEND "${SOURCE_DOCS_DIR}/Doxyfile-doxyconfig" "${DOXYFILE_CONTENTS}")

# if this is the doxyconfig project, copy doxygen-awesome-css to third-party
if(EXISTS "${CMAKE_SOURCE_DIR}/.doxyconfig")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/doxygen-awesome-css"
DESTINATION "${CMAKE_SOURCE_DIR}/third-party/doxyconfig")
endif()

# sunshine has its own icon and logo
if(NOT ${CMAKE_PROJECT_NAME} STREQUAL "Sunshine")
# download icon and logo
Expand Down
7 changes: 7 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ HTML_EXTRA_FILES += ../third-party/doxyconfig/doxygen-awesome-css/doxygen-awesom
HTML_EXTRA_FILES += ../third-party/doxyconfig/doxygen-awesome-css/doxygen-awesome-interactive-toc.js
HTML_EXTRA_FILES += ../third-party/doxyconfig/doxygen-awesome-css/doxygen-awesome-tabs.js
HTML_EXTRA_STYLESHEET = ../third-party/doxyconfig/doxygen-awesome-css/doxygen-awesome.css
HTML_EXTRA_STYLESHEET += doxyconfig.css
HTML_HEADER = header-doxyconfig.html

# custom aliases
Expand Down Expand Up @@ -90,6 +91,12 @@ PREDEFINED += __linux__
PREDEFINED += __MACH__
PREDEFINED += _WIN32

# search settings
SEARCHENGINE = YES
SERVER_BASED_SEARCH = YES
EXTERNAL_SEARCH = YES
SEARCHENGINE_URL = https://readthedocs.org/api/v3/search/

# general settings
CASE_SENSE_NAMES = YES
CREATE_SUBDIRS = NO
Expand Down
Loading

0 comments on commit fce978a

Please sign in to comment.