summaryrefslogtreecommitdiff
path: root/indra/doxygen/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'indra/doxygen/CMakeLists.txt')
-rw-r--r--indra/doxygen/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/doxygen/CMakeLists.txt b/indra/doxygen/CMakeLists.txt
new file mode 100644
index 0000000000..84188bd32f
--- /dev/null
+++ b/indra/doxygen/CMakeLists.txt
@@ -0,0 +1,28 @@
+# -*- cmake -*-
+
+# cmake_minimum_required should appear before any
+# other commands to guarantee full compatibility
+# with the version specified
+## prior to 2.8, the add_custom_target commands used in setting the version did not work correctly
+cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
+
+set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
+ "The root project/makefile/solution name. Defaults to SecondLife.")
+project(${ROOT_PROJECT_NAME})
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
+
+include(Variables)
+
+# add a target to generate API documentation with Doxygen
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+ GET_FILENAME_COMPONENT(DOXYGEN_TOP_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. PATH)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
+ add_custom_target(doc
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/..
+ COMMENT "Generating API documentation with Doxygen" VERBATIM
+ )
+endif(DOXYGEN_FOUND)
+