Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed May 16, 2024
1 parent 2d57ff7 commit e8eee08
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ jobs:
# Build C API documentation
- run: curl -L https://sourceforge.net/projects/doxygen/files/rel-1.9.3/doxygen-1.9.3.linux.bin.tar.gz/download | tar xzf -
- run: echo "`pwd`/doxygen-1.9.3/bin" >> $GITHUB_PATH
- run: cd crates/c-api && doxygen doxygen.conf
- run: cmake -S crates/c-api -B target/c-api
- run: cmake --build target/c-api --target doc

# install mdbook, build the docs, and test the docs
- uses: actions/cache@v4
Expand Down
11 changes: 9 additions & 2 deletions crates/c-api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ endif()

target_include_directories(wasmtime INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)

set(WASMTIME_GENERATED_CONF_H ${CMAKE_BINARY_DIR}/wasmtime-gen/wasmtime/conf.h)
target_include_directories(wasmtime INTERFACE ${CMAKE_BINARY_DIR}/wasmtime-gen)
set(WASMTIME_GENERATED_CONF_H ${CMAKE_BINARY_DIR}/include/wasmtime/conf.h)
target_include_directories(wasmtime INTERFACE ${CMAKE_BINARY_DIR}/include)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/include/wasmtime/conf.h.in
Expand All @@ -157,3 +157,10 @@ install(FILES ${WASMTIME_GENERATED_CONF_H}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wasmtime)
install(FILES ${WASMTIME_SHARED_FILES} ${WASMTIME_STATIC_FILES}
DESTINATION ${CMAKE_INSTALL_LIBDIR})

set(DOXYGEN_CONF_IN ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf.in)
set(DOXYGEN_CONF_OUT ${CMAKE_BINARY_DIR}/doxygen.conf)
configure_file(${DOXYGEN_CONF_IN} ${DOXYGEN_CONF_OUT})
add_custom_target(doc doxygen ${DOXYGEN_CONF_OUT}
DEPENDS ${WASMTIME_GENERATED_CONF_H} ${DOXYGEN_CONF_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
2 changes: 1 addition & 1 deletion crates/c-api/doxygen.conf → crates/c-api/doxygen.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.

INCLUDE_PATH = include
INCLUDE_PATH = include @CMAKE_BINARY_DIR@/include

# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
Expand Down

0 comments on commit e8eee08

Please sign in to comment.