diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml new file mode 100644 index 00000000000..531393b3e30 --- /dev/null +++ b/.github/workflows/doxygen.yml @@ -0,0 +1,46 @@ +--- +name: doxygen +'on': [push] # only auto-run on pushing to a branch +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +permissions: + contents: read + pages: write + id-token: write +jobs: + linux-x86_64: + name: linux-x86_64 + runs-on: ubuntu-latest + env: + MAKEFLAGS: -j2 + steps: + - name: Configure git + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Check out + uses: actions/checkout@v6 + with: + fetch-depth: 0 + submodules: recursive + - name: Install packages + run: | + sudo apt-get update -y + sudo apt-get install -y --no-install-recommends cmake make + - name: Install doxygen + uses: ssciwr/doxygen-install@v2 + with: + version: "1.16.1" + - name: Configure + run: | + cmake -S doc -B build $CMAKE_OPTS + - name: Build docs + run: cmake --build build --target doc + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload generated website + uses: actions/upload-pages-artifact@v3 + with: + path: 'build/doc/html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 0bf0bad72ab..5549fed811d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -759,7 +759,6 @@ ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(plugins) ADD_SUBDIRECTORY(tests) ADD_SUBDIRECTORY(data) -ADD_SUBDIRECTORY(doc) # install tasks ADD_SUBDIRECTORY(cmake/install) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 859c5f2c608..02ec94a6bb2 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,7 +1,12 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.13) + +PROJECT(lmms) +SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake/modules" ${CMAKE_MODULE_PATH}) + FIND_PACKAGE(Doxygen) -if(DOXYGEN_FOUND) - set(INPUTDIRS +if(Doxygen_FOUND OR DOXYGEN_FOUND) + set(INPUTDIRS "\"${CMAKE_CURRENT_SOURCE_DIR}../src/core\" \"${CMAKE_CURRENT_SOURCE_DIR}../src/gui\" \"${CMAKE_CURRENT_SOURCE_DIR}../src/tracks\" @@ -14,7 +19,8 @@ if(DOXYGEN_FOUND) WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMENT "Generating API documentation with Doxygen" SOURCES Doxyfile.in) -endif(DOXYGEN_FOUND) +else() + message(FATAL_ERROR "Doxygen was not found - could not generate docs.") +endif() ADD_SUBDIRECTORY(bash-completion) - diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index a595719fe5f..18fd2119533 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -738,16 +738,18 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. +# documented source files. +# +# Note: keep the main page as the first page in this list, or it might be +# overriden by other main pages (e.g. the ones in included libraries). -INPUT = "@CMAKE_CURRENT_SOURCE_DIR@/../src/core" \ - "@CMAKE_CURRENT_SOURCE_DIR@/../src/gui" \ - "@CMAKE_CURRENT_SOURCE_DIR@/../src/tracks" \ - "@CMAKE_CURRENT_SOURCE_DIR@/../include" \ - "@CMAKE_CURRENT_SOURCE_DIR@/../plugins" \ +INPUT = \ + "@CMAKE_SOURCE_DIR@/../README.md" \ + "@CMAKE_SOURCE_DIR@/../src/core" \ + "@CMAKE_SOURCE_DIR@/../src/gui" \ + "@CMAKE_SOURCE_DIR@/../src/tracks" \ + "@CMAKE_SOURCE_DIR@/../include" \ + "@CMAKE_SOURCE_DIR@/../plugins" \ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -886,7 +888,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = "@CMAKE_SOURCE_DIR@/../README.md" #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1942,7 +1944,47 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = "LMMS_BUILD_LINUX=" \ + "LMMS_HOST_X86_64=" \ + "LMMS_HAVE_ALSA=" \ + "LMMS_HAVE_FLUIDSYNTH=" \ + "LMMS_HAVE_JACK=" \ + "LMMS_HAVE_JACK_PRENAME=" \ + "LMMS_HAVE_WEAKJACK=" \ + "LMMS_HAVE_LV2=" \ + "LMMS_HAVE_SUIL=" \ + "LMMS_HAVE_MP3LAME=" \ + "LMMS_HAVE_SNDFILE_MP3=" \ + "LMMS_HAVE_OGGVORBIS=" \ + "LMMS_HAVE_OSS=" \ + "LMMS_HAVE_SNDIO=" \ + "LMMS_HAVE_PORTAUDIO=" \ + "LMMS_HAVE_SOUNDIO=" \ + "LMMS_HAVE_PULSEAUDIO=" \ + "LMMS_HAVE_SDL=" \ + "LMMS_HAVE_STK=" \ + "LMMS_HAVE_VST=" \ + "LMMS_HAVE_VST_32=" \ + "LMMS_HAVE_VST_64=" \ + "LMMS_HAVE_SF_COMPLEVEL=" \ + "LMMS_DEBUG_FPE=" \ + "LMMS_HAVE_PTHREAD_H=" \ + "LMMS_HAVE_UNISTD_H=" \ + "LMMS_HAVE_SYS_TYPES_H=" \ + "LMMS_HAVE_SYS_IPC_H=" \ + "LMMS_HAVE_SEMAPHORE_H=" \ + "LMMS_HAVE_SYS_TIME_H=" \ + "LMMS_HAVE_SYS_TIMES_H=" \ + "LMMS_HAVE_SYS_PRCTL_H=" \ + "LMMS_HAVE_SCHED_H=" \ + "LMMS_HAVE_SYS_SOUNDCARD_H=" \ + "LMMS_HAVE_SOUNDCARD_H=" \ + "LMMS_HAVE_FCNTL_H=" \ + "LMMS_HAVE_SYS_IOCTL_H=" \ + "LMMS_HAVE_CTYPE_H=" \ + "LMMS_HAVE_STRING_H=" \ + "LMMS_HAVE_PROCESS_H=" \ + "LMMS_HAVE_LOCALE_H=" \ # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The