Make doxygen optional.
parent
a65bb5255e
commit
bf7a1668b2
|
@ -1,4 +1,6 @@
|
|||
find_package(Doxygen REQUIRED)
|
||||
find_package(Doxygen)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
|
||||
set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/include)
|
||||
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
|
||||
|
@ -22,3 +24,5 @@ add_custom_target(docs DEPENDS ${DOXYGEN_INDEX_FILE})
|
|||
|
||||
# Ensure worker is built before documentation.
|
||||
add_dependencies(docs bootstrap)
|
||||
|
||||
endif()
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
pname = "bootstrap";
|
||||
src = ./.;
|
||||
version = "0.1.3";
|
||||
nativeBuildInputs = with pkgs; [ cmake ];
|
||||
nativeBuildInputs = with pkgs; [ cmake doxygen ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ./bootstrap $out/bin
|
||||
|
|
|
@ -56,7 +56,7 @@ mkdir -p "$BUILD"/build/{Debug,Release}
|
|||
# REWRITES
|
||||
# ============================================================
|
||||
|
||||
for file in flake.nix {,src/,test/}CMakeLists.txt
|
||||
for file in flake.nix {,src/,docs/,test/}CMakeLists.txt
|
||||
do
|
||||
sed -i "s/<NAME>/$NAME/g" "$BUILD/$file"
|
||||
done
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
find_package(Doxygen REQUIRED)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
|
||||
set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/include)
|
||||
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
|
||||
set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/xml/index.xml)
|
||||
|
@ -20,5 +22,7 @@ add_custom_command(OUTPUT
|
|||
|
||||
add_custom_target(docs DEPENDS ${DOXYGEN_INDEX_FILE})
|
||||
|
||||
# Ensure worker is built before documentation.
|
||||
add_dependencies(docs bootstrap)
|
||||
# Ensure executable is built before documentation.
|
||||
add_dependencies(docs "<NAME>")
|
||||
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue