Permalink
Browse files

Merge remote-tracking branch 'templates/c-template' into develop

* templates/c-template:
  CMake target to generate Doxygen documentation
  • Loading branch information...
2 parents 5f86a8b + 81998e4 commit 2e29823482fe66a83f317bf50c51c544515b4469 Douglas Creager committed Jun 20, 2011
Showing with 1,727 additions and 2 deletions.
  1. +4 −2 CMakeLists.txt
  2. +22 −0 docs/CMakeLists.txt
  3. +1,689 −0 docs/Doxyfile.in
  4. +12 −0 make-dist.sh
View
@@ -8,7 +8,7 @@
# ----------------------------------------------------------------------
cmake_minimum_required(VERSION 2.6)
-set(PROJECT_NAME changeme)
+set(PROJECT_NAME libcork)
project(${PROJECT_NAME})
enable_testing()
@@ -23,7 +23,8 @@ execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/version.sh
if(VERSION_RESULT)
message(FATAL_ERROR "Cannot determine version number")
endif(VERSION_RESULT)
-message("Current version: " ${VERSION})
+# This causes an annoying extra prompt in ccmake.
+# message("Current version: " ${VERSION})
#-----------------------------------------------------------------------
# Check for prerequisite libraries
@@ -51,6 +52,7 @@ endif(CMAKE_COMPILER_IS_GNUCC)
#-----------------------------------------------------------------------
# Include our subdirectories
+add_subdirectory(docs)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(tests)
View
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+# ----------------------------------------------------------------------
+# Copyright © 2011, RedJack, LLC.
+# All rights reserved.
+#
+# Please see the LICENSE.txt file in this distribution for license
+# details.
+# ----------------------------------------------------------------------
+
+# Generate Doxygen output
+
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+ 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)
Oops, something went wrong.

0 comments on commit 2e29823

Please sign in to comment.