Permalink
Browse files

Docs: Added doxygen target `f2k3_lua_simple_docs' .

  • Loading branch information...
1 parent 0b55df1 commit b28db9156bd5ebaff80667424b7f07d088a57d92 @MaikBeckmann committed Apr 29, 2011
Showing with 24 additions and 0 deletions.
  1. +5 −0 CMakeLists.txt
  2. +19 −0 details.cmake
View
@@ -12,6 +12,11 @@ set(CMAKE_Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/include")
add_subdirectory(src)
add_subdirectory(test)
+option(f2k3_BUILD_DOCS "Build docs via Doxygen" on)
+if(f2k3_BUILD_DOCS)
+ add_subdirectory(doc)
+endif()
+
install(EXPORT ${PROJECT_NAME}-targets
DESTINATION lib/${PROJECT_NAME}/cmake/
)
View
@@ -19,3 +19,22 @@ set(DEFAULT_INSTALL_DESTINATIONS
LIBRARY DESTINATION ${_library_dir}
ARCHIVE DESTINATION lib
)
+
+
+# Maybe useful for C++ application and module writers, thus a reusable function
+function(generate_doxygen_documentation _target_name _doxygen_config_file)
+ find_package(Doxygen)
+ if(NOT DOXYGEN_FOUND )
+ message(STATUS "Doxygen not found - Doxygen based docs won't be generated")
+ return()
+ endif()
+
+ if(NOT EXISTS ${_doxygen_config_file})
+ message( STATUS "Doxygen configuration file not found - Doxygen based docs won't be generated")
+ return()
+ endif()
+
+ add_custom_target(${_target_name}
+ COMMAND ${DOXYGEN_EXECUTABLE} "${DOXYGEN_CONFIG_FILE}"
+ )
+endfunction(generate_doxygen_documentation)

0 comments on commit b28db91

Please sign in to comment.