Skip to content

Commit

Permalink
Merge remote-tracking branch 'templates/c-template' into develop
Browse files Browse the repository at this point in the history
* templates/c-template:
  CMake target to generate Doxygen documentation
  • Loading branch information
Douglas Creager committed Jun 20, 2011
2 parents 5f86a8b + 81998e4 commit 2e29823
Show file tree
Hide file tree
Showing 4 changed files with 1,727 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Expand Up @@ -8,7 +8,7 @@
# ----------------------------------------------------------------------

cmake_minimum_required(VERSION 2.6)
set(PROJECT_NAME changeme)
set(PROJECT_NAME libcork)
project(${PROJECT_NAME})
enable_testing()

Expand All @@ -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
Expand Down Expand Up @@ -51,6 +52,7 @@ endif(CMAKE_COMPILER_IS_GNUCC)
#-----------------------------------------------------------------------
# Include our subdirectories

add_subdirectory(docs)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(tests)
22 changes: 22 additions & 0 deletions docs/CMakeLists.txt
@@ -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)

0 comments on commit 2e29823

Please sign in to comment.