Skip to content

Commit

Permalink
doxygen generates docs from cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
vicrucann committed May 11, 2016
1 parent b7d3aa2 commit 14a1de8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/Doxyfile → docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = Software package for cultural heritage data representation by means of image manipulation and 3D sketching
PROJECT_BRIEF = "Software package for cultural heritage data representation by means of image manipulation and 3D sketching"

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
Expand All @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY =
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/doc_doxygen/

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down Expand Up @@ -780,7 +780,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT =
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../src/

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -820,7 +820,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE =
EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/demos/ @CMAKE_CURRENT_SOURCE_DIR@/tests/

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down
35 changes: 32 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
## Project settings
project(cherish)
cmake_minimum_required(VERSION 2.8.11)


## Build options
option(cheris_BUILD_DOC "Build cherish documentation" ON)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE)
message(STATUS "Building in ${CMAKE_BUILD_TYPE} mode")


## Compiler settings
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
endif()
IF( CMAKE_COMPILER_IS_GNUCXX )
if( CMAKE_COMPILER_IS_GNUCXX )
ADD_DEFINITIONS(
-Wall -Wundef -Wcast-align -Wchar-subscripts -Wpointer-arith
-Wwrite-strings -Wpacked -Wformat-security
-Wmissing-format-attribute -Wold-style-cast
)
ADD_DEFINITIONS( -fvisibility=hidden )
ELSEIF( CMAKE_CXX_COMPILER MATCHES "clang" )
elseif( CMAKE_CXX_COMPILER MATCHES "clang" )
ADD_DEFINITIONS( -Wall -Wextra -Wno-unused-parameter )
ADD_DEFINITIONS( -fvisibility=hidden )
ENDIF()
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
Expand All @@ -29,6 +35,7 @@ if( CMAKE_BUILD_TYPE MATCHES "^[Rr]elease$" )
endif()
add_definitions( -DQT_COMPILING_QSTRING_COMPAT_CPP)


## Required Qt packages
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
Expand All @@ -45,22 +52,43 @@ set(QT_LIBRARIES
${Qt5Xml_LIBRARIES}
)


## Required OSG packages
find_package(OpenSceneGraph REQUIRED COMPONENTS osgDB osgGA osgUtil osgViewer osgText)
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})


## Other build packages
find_package(Doxygen)
if (DOXYGEN_FOUND)
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/../docs/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")
add_custom_target( doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)


## Test settings
find_package(Qt5Test REQUIRED)
enable_testing()
set(QT_QTTEST_LIBRARY
${Qt5Test_LIBRARIES}
)


## Icons directory setting
set(ICONS_DIR
"${CMAKE_SOURCE_DIR}/icons"
)


## Adding subdirectories
add_subdirectory(dureu3d)
add_subdirectory(libGUI)
Expand All @@ -69,4 +97,5 @@ add_subdirectory(libSGControls)
add_subdirectory(libSGUtils)
add_subdirectory(tests)


## Installer settings (CPack) will be located here

0 comments on commit 14a1de8

Please sign in to comment.