diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..236a07d --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +# Compiled Object files +*.slo +*.lo +*.o + +# Compiled Dynamic libraries +*.so +*.dylib + +# Compiled Static libraries +*.lai +*.la +*.a + +# Build dir +build* +debug_build +release_build +/bin +/lib +/install + +# Qt cache +CMakeLists.txt.user +CMakeLists.txt.user.* + +# IDE project files +*.sublime-project +*.sublime-workspace +.vscode + +# Local config windows +_configure.bat +_open-project.bat +_start-cmake-gui.bat +_start-cmd.bat + +# Local config unix +.localconfig + +# Wiki +wiki diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c4fef8..1573dbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,81 +1,211 @@ -# --- Script Setup -cmake_minimum_required (VERSION 2.8) +# +# CMake options +# -if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") - message(FATAL_ERROR "In-source builds are not allowed.") -endif("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") +# CMake version +cmake_minimum_required(VERSION 3.0 FATAL_ERROR) -# Disable in-source builds and modifications -# to the source tree. -set(CMAKE_DISABLE_SOURCE_CHANGES ON) -set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) +# +# Configure CMake environment +# -# Enable compiler tests. -enable_testing() +# Register general cmake commands +include(cmake/Custom.cmake) -project(OpenP2P C CXX) +# Set policies +set_policy(CMP0028 NEW) # ENABLE CMP0028: Double colon in target name means ALIAS or IMPORTED target. +set_policy(CMP0054 NEW) # ENABLE CMP0054: Only interpret if() arguments as variables or keywords when unquoted. +set_policy(CMP0042 NEW) # ENABLE CMP0042: MACOSX_RPATH is enabled by default. +set_policy(CMP0063 NEW) # ENABLE CMP0063: Honor visibility properties for all target types. -if(NOT CMAKE_BUILD_TYPE) - # Build debug by default. - set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose build type (options are None, Debug, Release, RelWithDebInfo and MinSizeRel)." FORCE) -endif(NOT CMAKE_BUILD_TYPE) +# Include cmake modules +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -# --- Compiler Properties +include(GenerateExportHeader) -set(OPENP2P_MAJOR_VERSION 1) -set(OPENP2P_MINOR_VERSION 0) -set(OPENP2P_PATCH_VERSION 0) -set(OPENP2P_BUILD_VERSION 0) -set(OPENP2P_VERSION ${OPENP2P_MAJOR_VERSION}.${OPENP2P_MINOR_VERSION}.${OPENP2P_PATCH_VERSION}.${OPENP2P_BUILD_VERSION}) +set(WriterCompilerDetectionHeaderFound NOTFOUND) +# This module is only available with CMake >=3.1, so check whether it could be found +# BUT in CMake 3.1 this module doesn't recognize AppleClang as compiler, so just use it as of CMake 3.2 +if (${CMAKE_VERSION} VERSION_GREATER "3.2") + include(WriteCompilerDetectionHeader OPTIONAL RESULT_VARIABLE WriterCompilerDetectionHeaderFound) +endif() -message(STATUS "Building OpenP2P version ${OPENP2P_VERSION} using build type '${CMAKE_BUILD_TYPE}'.") -message(STATUS " Source directory is '${PROJECT_SOURCE_DIR}'.") -message(STATUS " Build directory is '${PROJECT_BINARY_DIR}'.") +# Include custom cmake modules +include(cmake/GetGitRevisionDescription.cmake) +include(cmake/HealthCheck.cmake) +include(cmake/GenerateTemplateExportHeader.cmake) -# --- Compiler Flags -add_definitions( -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS ) +# +# Project description and (meta) information +# -# Enable most warnings. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wshadow -Wundef -Wpointer-arith -Wcast-align -Wwrite-strings") - -# Use C++11. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - -# Enable/disable optimisation depending on build type. -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0") -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os") - -# Add version as preprocessor defines. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENP2P_VERSION=${OPENP2P_VERSION}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENP2P_MAJOR_VERSION=${OPENP2P_MAJOR_VERSION}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENP2P_MINOR_VERSION=${OPENP2P_MINOR_VERSION}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENP2P_PATCH_VERSION=${OPENP2P_PATCH_VERSION}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENP2P_BUILD_VERSION=${OPENP2P_BUILD_VERSION}") - -# Enable/disable profiling information. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") +# Get git revision +get_git_head_revision(GIT_REFSPEC GIT_SHA1) +string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV) +if(NOT GIT_SHA1) + set(GIT_REV "0") +endif() + +# Meta information about the project +set(META_PROJECT_NAME "OpenP2P") +set(META_PROJECT_DESCRIPTION "Network layer library for facilitating decentralised peer-to-peer communication.") +set(META_AUTHOR_ORGANIZATION "OpenP2P") +set(META_AUTHOR_DOMAIN "http://openp2p.org") +set(META_AUTHOR_MAINTAINER "Stephen Cross") +set(META_VERSION_MAJOR "1") +set(META_VERSION_MINOR "0") +set(META_VERSION_PATCH "0") +set(META_VERSION_REVISION "${GIT_REV}") +set(META_VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}") +set(META_NAME_VERSION "${META_PROJECT_NAME} v${META_VERSION} (${META_VERSION_REVISION})") +set(META_CMAKE_INIT_SHA "${GIT_SHA1}") + +string(MAKE_C_IDENTIFIER ${META_PROJECT_NAME} META_PROJECT_ID) +string(TOUPPER ${META_PROJECT_ID} META_PROJECT_ID) + + +# +# Project configuration options +# + +# Project options +option(BUILD_SHARED_LIBS "Build shared instead of static libraries." ON) +option(OPTION_SELF_CONTAINED "Create a self-contained install with all dependencies." OFF) +option(OPTION_BUILD_TESTS "Build tests." ON) +option(OPTION_BUILD_DOCS "Build documentation." OFF) +option(OPTION_BUILD_EXAMPLES "Build examples." ON) + + +# +# Declare project +# + +# Generate folders for IDE targets (e.g., VisualStudio solutions) +set_property(GLOBAL PROPERTY USE_FOLDERS ON) +set(IDE_FOLDER "") + +# Declare project +project(${META_PROJECT_NAME} C CXX) + +# Set output directories +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + +# Create version file +file(WRITE "${PROJECT_BINARY_DIR}/VERSION" "${META_NAME_VERSION}") + + +# +# Compiler settings and options +# + +include(cmake/CompileOptions.cmake) + + +# +# Project Health Check Setup +# + +# Add cmake-init template check cmake targets +add_check_template_target(${META_CMAKE_INIT_SHA}) + +# Configure health check tools +enable_cppcheck(On) +enable_clang_tidy(On) + + +# +# Deployment/installation setup +# + +# Get project name +set(project ${META_PROJECT_NAME}) + +# Check for system dir install +set(SYSTEM_DIR_INSTALL FALSE) +if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local") + set(SYSTEM_DIR_INSTALL TRUE) +endif() + +# Installation paths +if(UNIX AND SYSTEM_DIR_INSTALL) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ + set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake + set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/ + set(INSTALL_DATA "share/${project}") # /usr/[local]/share/ + set(INSTALL_BIN "bin") # /usr/[local]/bin + set(INSTALL_SHARED "lib") # /usr/[local]/lib + set(INSTALL_LIB "lib") # /usr/[local]/lib + set(INSTALL_INCLUDE "include") # /usr/[local]/include + set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ + set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications + set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps + set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts) +else() + # Install into local directory + set(INSTALL_ROOT ".") # ./ + set(INSTALL_CMAKE "cmake") # ./cmake + set(INSTALL_EXAMPLES ".") # ./ + set(INSTALL_DATA ".") # ./ + set(INSTALL_BIN ".") # ./ + set(INSTALL_SHARED "lib") # ./lib + set(INSTALL_LIB "lib") # ./lib + set(INSTALL_INCLUDE "include") # ./include + set(INSTALL_DOC "doc") # ./doc + set(INSTALL_SHORTCUTS "misc") # ./misc + set(INSTALL_ICONS "misc") # ./misc + set(INSTALL_INIT "misc") # ./misc +endif() + +# Set runtime path +set(CMAKE_SKIP_BUILD_RPATH FALSE) # Add absolute path to all dependencies for BUILD +set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) # Use CMAKE_INSTALL_RPATH for INSTALL +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) # Do NOT add path to dependencies for INSTALL + +if(NOT SYSTEM_DIR_INSTALL) + # Find libraries relative to binary + if(APPLE) + set(CMAKE_INSTALL_RPATH "@loader_path/../../../${INSTALL_LIB}") + else() + set(CMAKE_INSTALL_RPATH "$ORIGIN/${INSTALL_LIB}") + endif() +endif() + + +# +# Project modules +# + +add_subdirectory(source) +add_subdirectory(docs) +add_subdirectory(examples) -# --- Subdirectories +if(OPTION_BUILD_TESTS) + set(IDE_FOLDER "Tests") + add_subdirectory(tests) +endif() -# All headers are in the /include directory. -include_directories ( - "${PROJECT_SOURCE_DIR}/include" - ) +add_subdirectory(deploy) -# Documentation. -add_subdirectory(docs) -# Examples. -add_subdirectory(example) +# +# Deployment (global project files) +# -# Library code. -add_subdirectory(src) +# Install version file +install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_ROOT} COMPONENT runtime) -# Tests. -add_subdirectory(tests) +# Install cmake find script for the project +install(FILES ${META_PROJECT_NAME}Config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev) -# Tools. -add_subdirectory(tools) +# Install the project meta files +#install(FILES AUTHORS DESTINATION ${INSTALL_ROOT} COMPONENT runtime) +install(FILES LICENSE DESTINATION ${INSTALL_ROOT} COMPONENT runtime) +install(FILES README.md DESTINATION ${INSTALL_ROOT} COMPONENT runtime) +# Install runtime data +install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${INSTALL_DATA} COMPONENT runtime) diff --git a/OpenP2PConfig.cmake b/OpenP2PConfig.cmake new file mode 100644 index 0000000..a7b2a10 --- /dev/null +++ b/OpenP2PConfig.cmake @@ -0,0 +1,62 @@ + +# This config script tries to locate the project either in its source tree +# or from an install location. +# +# Please adjust the list of submodules to search for. + + +# List of modules +set(MODULE_NAMES + Concurrency + Crypt + Event + FolderSync + IP + OFTorrent + Root + TCP + Transport + UDP + Util +) + + +# Macro to search for a specific module +macro(find_module FILENAME) + if(EXISTS "${FILENAME}") + set(MODULE_FOUND TRUE) + include("${FILENAME}") + endif() +endmacro() + +# Macro to search for all modules +macro(find_modules PREFIX) + foreach(module_name ${MODULE_NAMES}) + if(TARGET ${module_name}) + set(MODULE_FOUND TRUE) + else() + find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake") + endif() + endforeach(module_name) +endmacro() + + +# Try install location +set(MODULE_FOUND FALSE) +find_modules("cmake") + +if(MODULE_FOUND) + return() +endif() + +# Try common build locations +if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + find_modules("build-debug/cmake") + find_modules("build/cmake") +else() + find_modules("build/cmake") + find_modules("build-debug/cmake") +endif() + +# Signal success/failure to CMake +set(template_FOUND ${MODULE_FOUND}) diff --git a/README.md b/README.md new file mode 100644 index 0000000..0dc8824 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# OpenP2P + +Network layer library for facilitating decentralised peer-to-peer communication. + +[openp2p.org](http://openp2p.org) + +## Quickstart + +```bash +mkdir build +cd build +cmake .. +make +``` diff --git a/cmake/CheckTemplate.cmake b/cmake/CheckTemplate.cmake new file mode 100644 index 0000000..6f69590 --- /dev/null +++ b/cmake/CheckTemplate.cmake @@ -0,0 +1,49 @@ + +# +# Get cmake-init latest commit SHA on master +# + +file(DOWNLOAD + "https://api.github.com/repos/cginternals/cmake-init/commits/master" + "${PROJECT_BINARY_DIR}/cmake-init.github.data" +) +file(READ + "${PROJECT_BINARY_DIR}/cmake-init.github.data" + CMAKE_INIT_INFO +) + +string(REGEX MATCH + "\"sha\": \"([0-9a-f]+)\"," + CMAKE_INIT_SHA + ${CMAKE_INIT_INFO}) + +string(SUBSTRING + ${CMAKE_INIT_SHA} + 8 + 40 + CMAKE_INIT_SHA +) + +# +# Get latest cmake-init commit on this repository +# + +# APPLIED_CMAKE_INIT_SHA can be set by parent script +if(NOT APPLIED_CMAKE_INIT_SHA) + # [TODO]: Get from git commit list (see cmake_init/source/scripts/check_template.sh) + set(APPLIED_CMAKE_INIT_SHA "") +endif () + +if("${APPLIED_CMAKE_INIT_SHA}" STREQUAL "") + message(WARNING + "No cmake-init version detected, could not verify up-to-dateness. " + "Set the cmake-init version by defining a META_CMAKE_INIT_SHA for your project." + ) + return() +endif() + +if(${APPLIED_CMAKE_INIT_SHA} STREQUAL ${CMAKE_INIT_SHA}) + message(STATUS "cmake-init template is up-to-date (${CMAKE_INIT_SHA})") +else() + message(STATUS "cmake-init template needs an update https://github.com/cginternals/cmake-init/compare/${APPLIED_CMAKE_INIT_SHA}...master") +endif() diff --git a/cmake/ClangTidy.cmake b/cmake/ClangTidy.cmake new file mode 100644 index 0000000..3e01032 --- /dev/null +++ b/cmake/ClangTidy.cmake @@ -0,0 +1,24 @@ + +# Function to register a target for clang-tidy +function(perform_clang_tidy check_target target) + set(includes "$") + + add_custom_target( + ${check_target} + COMMAND + ${clang_tidy_EXECUTABLE} + -p\t${PROJECT_BINARY_DIR} + ${ARGN} + -checks=* + "$<$>:--\t$<$:-I$>>" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + + set_target_properties(${check_target} + PROPERTIES + FOLDER "Maintenance" + EXCLUDE_FROM_DEFAULT_BUILD 1 + ) + + add_dependencies(${check_target} ${target}) +endfunction() diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake new file mode 100644 index 0000000..f51ee89 --- /dev/null +++ b/cmake/CompileOptions.cmake @@ -0,0 +1,152 @@ + +# +# Platform and architecture setup +# + +# Get upper case system name +string(TOUPPER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME_UPPER) + +# Determine architecture (32/64 bit) +set(X64 OFF) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(X64 ON) +endif() + + +# +# Project options +# + +set(DEFAULT_PROJECT_OPTIONS + DEBUG_POSTFIX "d" + CXX_STANDARD 11 # Not available before CMake 3.1; see below for manual command line argument addition + LINKER_LANGUAGE "CXX" + POSITION_INDEPENDENT_CODE ON + CXX_VISIBILITY_PRESET "hidden" +) + +find_package(Boost COMPONENTS system thread REQUIRED) +find_package(CryptoPP REQUIRED) + + + +# +# Include directories +# + +set(DEFAULT_INCLUDE_DIRECTORIES) + + +# +# Libraries +# + +set(DEFAULT_LIBRARIES ${Boost_LIBRARIES} ${CryptoPP_LIBRARIES}) + + +# +# Compile definitions +# + +set(DEFAULT_COMPILE_DEFINITIONS + SYSTEM_${SYSTEM_NAME_UPPER} +) + +# MSVC compiler options +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") + set(DEFAULT_COMPILE_DEFINITIONS ${DEFAULT_COMPILE_DEFINITIONS} + _SCL_SECURE_NO_WARNINGS # Calling any one of the potentially unsafe methods in the Standard C++ Library + _CRT_SECURE_NO_WARNINGS # Calling any one of the potentially unsafe methods in the CRT Library + ) +endif () + + +# +# Compile options +# + +set(DEFAULT_COMPILE_OPTIONS) + +# MSVC compiler options +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") + set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS} + /MP # -> build with multiple processes + /W4 # -> warning level 4 + # /WX # -> treat warnings as errors + + /wd4251 # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2' + /wd4592 # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation) + # /wd4201 # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM) + # /wd4127 # -> disable warning: conditional expression is constant (caused by Qt) + + #$<$: + #/RTCc # -> value is assigned to a smaller data type and results in a data loss + #> + + $<$: + /Gw # -> whole program global optimization + /GS- # -> buffer security check: no + /GL # -> whole program optimization: enable link-time code generation (disables Zi) + /GF # -> enable string pooling + > + + # No manual c++11 enable for MSVC as all supported MSVC versions for cmake-init have C++11 implicitly enabled (MSVC >=2013) + ) +endif () + +# GCC and Clang compiler options +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS} + -Wall + -Wextra + -Wunused + + -Wreorder + -Wignored-qualifiers + -Wmissing-braces + -Wreturn-type + -Wswitch + -Wswitch-default + -Wuninitialized + -Wmissing-field-initializers + + $<$: + -Wmaybe-uninitialized + + $<$,4.8>: + -Wpedantic + + -Wreturn-local-addr + > + > + + $<$: + -Wpedantic + + # -Wreturn-stack-address # gives false positives + > + + $<$: + -pthread + > + + # Required for CMake < 3.1; should be removed if minimum required CMake version is raised. + $<$: + -std=c++11 + > + ) +endif () + + +# +# Linker options +# + +set(DEFAULT_LINKER_OPTIONS) + +# Use pthreads on mingw and linux +if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + set(DEFAULT_LINKER_OPTIONS + -pthread + ) +endif() diff --git a/cmake/ComponentInstall.cmake b/cmake/ComponentInstall.cmake new file mode 100644 index 0000000..8606060 --- /dev/null +++ b/cmake/ComponentInstall.cmake @@ -0,0 +1,6 @@ + +# Execute cmake_install.cmake wrapper that allows to pass both DESTDIR and COMPONENT environment variable + +execute_process( + COMMAND ${CMAKE_COMMAND} -DCOMPONENT=$ENV{COMPONENT} -P cmake_install.cmake +) diff --git a/cmake/Cppcheck.cmake b/cmake/Cppcheck.cmake new file mode 100644 index 0000000..5bf4638 --- /dev/null +++ b/cmake/Cppcheck.cmake @@ -0,0 +1,28 @@ + +# Function to register a target for cppcheck +function(perform_cppcheck check_target target) + set(includes "$") + + add_custom_target( + ${check_target} + COMMAND + ${cppcheck_EXECUTABLE} + "$<$:-I$>" + --check-config + --enable=warning,performance,portability,information,missingInclude + --quiet + --std=c++11 + --verbose + --suppress=missingIncludeSystem + ${ARGN} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + + set_target_properties(${check_target} + PROPERTIES + FOLDER "Maintenance" + EXCLUDE_FROM_DEFAULT_BUILD 1 + ) + + add_dependencies(${check_target} ${target}) +endfunction() diff --git a/cmake/Custom.cmake b/cmake/Custom.cmake new file mode 100644 index 0000000..e0e690f --- /dev/null +++ b/cmake/Custom.cmake @@ -0,0 +1,46 @@ + +# Set policy if policy is available +function(set_policy POL VAL) + + if(POLICY ${POL}) + cmake_policy(SET ${POL} ${VAL}) + endif() + +endfunction(set_policy) + + +# Define function "source_group_by_path with three mandatory arguments (PARENT_PATH, REGEX, GROUP, ...) +# to group source files in folders (e.g. for MSVC solutions). +# +# Example: +# source_group_by_path("${CMAKE_CURRENT_SOURCE_DIR}/src" "\\\\.h$|\\\\.inl$|\\\\.cpp$|\\\\.c$|\\\\.ui$|\\\\.qrc$" "Source Files" ${sources}) +function(source_group_by_path PARENT_PATH REGEX GROUP) + + foreach (FILENAME ${ARGN}) + + get_filename_component(FILEPATH "${FILENAME}" REALPATH) + file(RELATIVE_PATH FILEPATH ${PARENT_PATH} ${FILEPATH}) + get_filename_component(FILEPATH "${FILEPATH}" DIRECTORY) + + string(REPLACE "/" "\\" FILEPATH "${FILEPATH}") + + source_group("${GROUP}\\${FILEPATH}" REGULAR_EXPRESSION "${REGEX}" FILES ${FILENAME}) + + endforeach() + +endfunction(source_group_by_path) + + +# Function that extract entries matching a given regex from a list. +# ${OUTPUT} will store the list of matching filenames. +function(list_extract OUTPUT REGEX) + + foreach(FILENAME ${ARGN}) + if(${FILENAME} MATCHES "${REGEX}") + list(APPEND ${OUTPUT} ${FILENAME}) + endif() + endforeach() + + set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE) + +endfunction(list_extract) diff --git a/cmake/FindCryptoPP.cmake b/cmake/FindCryptoPP.cmake new file mode 100644 index 0000000..491e130 --- /dev/null +++ b/cmake/FindCryptoPP.cmake @@ -0,0 +1,35 @@ +# - Find CryptoPP + +if(CryptoPP_INCLUDE_DIR AND CryptoPP_LIBRARIES) + set(CRYPTOPP_FOUND TRUE) + +else(CryptoPP_INCLUDE_DIR AND CryptoPP_LIBRARIES) + find_path(CryptoPP_INCLUDE_DIR cryptlib.h + /usr/include/crypto++ + /usr/include/cryptopp + /usr/local/include/crypto++ + /usr/local/include/cryptopp + /opt/local/include/crypto++ + /opt/local/include/cryptopp + $ENV{SystemDrive}/Crypto++/include + ) + + find_library(CryptoPP_LIBRARIES NAMES cryptopp + PATHS + /usr/lib + /usr/local/lib + /opt/local/lib + $ENV{SystemDrive}/Crypto++/lib + ) + + if(CryptoPP_INCLUDE_DIR AND CryptoPP_LIBRARIES) + set(CRYPTOPP_FOUND TRUE) + message(STATUS "Found CryptoPP: ${CRYPTOPP_INCLUDE_DIR}, ${CRYPTOPP_LIBRARIES}") + else(CRYPTOPP_INCLUDE_DIR AND CRYPTOPP_LIBRARIES) + set(CRYPTOPP_FOUND FALSE) + message(STATUS "CryptoPP not found.") + endif(CryptoPP_INCLUDE_DIR AND CryptoPP_LIBRARIES) + + mark_as_advanced(CryptoPP_INCLUDE_DIR CryptoPP_LIBRARIES) + +endif(CryptoPP_INCLUDE_DIR AND CryptoPP_LIBRARIES) diff --git a/cmake/Findclang_tidy.cmake b/cmake/Findclang_tidy.cmake new file mode 100644 index 0000000..e77fca9 --- /dev/null +++ b/cmake/Findclang_tidy.cmake @@ -0,0 +1,27 @@ + +# Findclang_tidy results: +# clang_tidy_FOUND +# clang_tidy_EXECUTABLE + +include(FindPackageHandleStandardArgs) + +find_program(clang_tidy_EXECUTABLE + NAMES + clang-tidy-3.5 + clang-tidy-3.6 + clang-tidy-3.7 + clang-tidy-3.8 + clang-tidy-3.9 + clang-tidy-4.0 + PATHS + "${CLANG_TIDY_DIR}" +) + +find_package_handle_standard_args(clang_tidy + FOUND_VAR + clang_tidy_FOUND + REQUIRED_VARS + clang_tidy_EXECUTABLE +) + +mark_as_advanced(clang_tidy_EXECUTABLE) \ No newline at end of file diff --git a/cmake/Findcppcheck.cmake b/cmake/Findcppcheck.cmake new file mode 100644 index 0000000..c90e7cd --- /dev/null +++ b/cmake/Findcppcheck.cmake @@ -0,0 +1,28 @@ + +# Findcppcheck results: +# cppcheck_FOUND +# cppcheck_EXECUTABLE + +include(FindPackageHandleStandardArgs) + +# work around CMP0053, see http://public.kitware.com/pipermail/cmake/2014-November/059117.html +set(PROGRAMFILES_x86_ENV "PROGRAMFILES(x86)") + +find_program(cppcheck_EXECUTABLE + NAMES + cppcheck + PATHS + "${CPPCHECK_DIR}" + "$ENV{CPPCHECK_DIR}" + "$ENV{PROGRAMFILES}/Cppcheck" + "$ENV{${PROGRAMFILES_x86_ENV}}/Cppcheck" +) + +find_package_handle_standard_args(cppcheck + FOUND_VAR + cppcheck_FOUND + REQUIRED_VARS + cppcheck_EXECUTABLE +) + +mark_as_advanced(cppcheck_EXECUTABLE) diff --git a/cmake/GenerateTemplateExportHeader.cmake b/cmake/GenerateTemplateExportHeader.cmake new file mode 100644 index 0000000..4329b1f --- /dev/null +++ b/cmake/GenerateTemplateExportHeader.cmake @@ -0,0 +1,12 @@ + +# Creates an export header similar to generate_export_header, but for templates. +# The main difference is that for MSVC, templates must not get exported. +# When the file ${export_file} is included in source code, the macro ${target_id}_TEMPLATE_API +# may get used to define public visibility for templates on GCC and Clang platforms. +function(generate_template_export_header target target_id export_file) + if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") + configure_file(${PROJECT_SOURCE_DIR}/source/codegeneration/openp2p_msvc_api.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/${export_file}) + else() + configure_file(${PROJECT_SOURCE_DIR}/source/codegeneration/openp2p_api.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/${export_file}) + endif() +endfunction() diff --git a/cmake/GetGitRevisionDescription.cmake b/cmake/GetGitRevisionDescription.cmake new file mode 100644 index 0000000..85eae15 --- /dev/null +++ b/cmake/GetGitRevisionDescription.cmake @@ -0,0 +1,130 @@ +# - Returns a version string from Git +# +# These functions force a re-configure on each git commit so that you can +# trust the values of the variables in your build system. +# +# get_git_head_revision( [ ...]) +# +# Returns the refspec and sha hash of the current head revision +# +# git_describe( [ ...]) +# +# Returns the results of git describe on the source tree, and adjusting +# the output so that it tests false if an error occurs. +# +# git_get_exact_tag( [ ...]) +# +# Returns the results of git describe --exact-match on the source tree, +# and adjusting the output so that it tests false if there was no exact +# matching tag. +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__get_git_revision_description) + return() +endif() +set(__get_git_revision_description YES) + +# We must run the following at "include" time, not at function call time, +# to find the path to this module rather than the path to a calling list file +get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) + +function(get_git_head_revision _refspecvar _hashvar) + set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories + set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") + get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) + if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) + # We have reached the root directory, we are not in git + set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + return() + endif() + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + endwhile() + # check if this is a submodule + if(NOT IS_DIRECTORY ${GIT_DIR}) + file(READ ${GIT_DIR} submodule) + string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) + get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) + get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) + endif() + set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data") + if(NOT EXISTS "${GIT_DATA}") + file(MAKE_DIRECTORY "${GIT_DATA}") + endif() + + if(NOT EXISTS "${GIT_DIR}/HEAD") + return() + endif() + set(HEAD_FILE "${GIT_DATA}/HEAD") + configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY) + + configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in" + "${GIT_DATA}/grabRef.cmake" + @ONLY) + include("${GIT_DATA}/grabRef.cmake") + + set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE) + set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) +endfunction() + +function(git_describe _var) + if(NOT GIT_FOUND) + find_package(Git QUIET) + endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) + return() + endif() + + # TODO sanitize + #if((${ARGN}" MATCHES "&&") OR + # (ARGN MATCHES "||") OR + # (ARGN MATCHES "\\;")) + # message("Please report the following error to the project!") + # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") + #endif() + + #message(STATUS "Arguments to execute_process: ${ARGN}") + + execute_process(COMMAND + "${GIT_EXECUTABLE}" + describe + ${hash} + ${ARGN} + WORKING_DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}" + RESULT_VARIABLE + res + OUTPUT_VARIABLE + out + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT res EQUAL 0) + set(out "${out}-${res}-NOTFOUND") + endif() + + set(${_var} "${out}" PARENT_SCOPE) +endfunction() + +function(git_get_exact_tag _var) + git_describe(out --exact-match ${ARGN}) + set(${_var} "${out}" PARENT_SCOPE) +endfunction() diff --git a/cmake/GetGitRevisionDescription.cmake.in b/cmake/GetGitRevisionDescription.cmake.in new file mode 100644 index 0000000..6d8b708 --- /dev/null +++ b/cmake/GetGitRevisionDescription.cmake.in @@ -0,0 +1,41 @@ +# +# Internal file for GetGitRevisionDescription.cmake +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(HEAD_HASH) + +file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) + +string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) +if(HEAD_CONTENTS MATCHES "ref") + # named branch + string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") + if(EXISTS "@GIT_DIR@/${HEAD_REF}") + configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) + else() + configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY) + file(READ "@GIT_DATA@/packed-refs" PACKED_REFS) + if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}") + set(HEAD_HASH "${CMAKE_MATCH_1}") + endif() + endif() +else() + # detached HEAD + configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) +endif() + +if(NOT HEAD_HASH) + file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) + string(STRIP "${HEAD_HASH}" HEAD_HASH) +endif() diff --git a/cmake/HealthCheck.cmake b/cmake/HealthCheck.cmake new file mode 100644 index 0000000..8df8b9a --- /dev/null +++ b/cmake/HealthCheck.cmake @@ -0,0 +1,104 @@ + +include(${CMAKE_CURRENT_LIST_DIR}/Cppcheck.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/ClangTidy.cmake) + +set(OPTION_CPPCHECK_ENABLED Off) +set(OPTION_CLANG_TIDY_ENABLED Off) + +# Function to register a target for enabled health checks +function(perform_health_checks target) + if(NOT TARGET check-all) + add_custom_target(check-all) + + set_target_properties(check-all + PROPERTIES + FOLDER "Maintenance" + EXCLUDE_FROM_DEFAULT_BUILD 1 + ) + endif() + + add_custom_target(check-${target}) + + set_target_properties(check-${target} + PROPERTIES + FOLDER "Maintenance" + EXCLUDE_FROM_DEFAULT_BUILD 1 + ) + + if (OPTION_CPPCHECK_ENABLED) + perform_cppcheck(cppcheck-${target} ${target} ${ARGN}) + add_dependencies(check-${target} cppcheck-${target}) + endif() + + if (OPTION_CLANG_TIDY_ENABLED) + perform_clang_tidy(clang-tidy-${target} ${target} ${ARGN}) + add_dependencies(check-${target} clang-tidy-${target}) + endif() + + add_dependencies(check-all check-${target}) +endfunction() + +# Enable or disable cppcheck for health checks +function(enable_cppcheck status) + if(NOT ${status}) + set(OPTION_CPPCHECK_ENABLED ${status} PARENT_SCOPE) + message(STATUS "Check cppcheck skipped: Manually disabled") + + return() + endif() + + find_package(cppcheck) + + if(NOT cppcheck_FOUND) + set(OPTION_CPPCHECK_ENABLED Off PARENT_SCOPE) + message(STATUS "Check cppcheck skipped: cppcheck not found") + + return() + endif() + + set(OPTION_CPPCHECK_ENABLED ${status} PARENT_SCOPE) + message(STATUS "Check cppcheck") +endfunction() + +# Enable or disable clang-tidy for health checks +function(enable_clang_tidy status) + if(NOT ${status}) + set(OPTION_CLANG_TIDY_ENABLED ${status} PARENT_SCOPE) + message(STATUS "Check clang-tidy skipped: Manually disabled") + + return() + endif() + + find_package(clang_tidy) + + if(NOT clang_tidy_FOUND) + set(OPTION_CLANG_TIDY_ENABLED Off PARENT_SCOPE) + message(STATUS "Check clang-tidy skipped: clang-tidy not found") + + return() + endif() + + set(OPTION_CLANG_TIDY_ENABLED ${status} PARENT_SCOPE) + message(STATUS "Check clang-tidy") + + set(CMAKE_EXPORT_COMPILE_COMMANDS On PARENT_SCOPE) +endfunction() + +# Configure cmake target to check for cmake-init template +function(add_check_template_target current_template_sha) + add_custom_target( + check-template + COMMAND ${CMAKE_COMMAND} + -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} + -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} + -DAPPLIED_CMAKE_INIT_SHA=${current_template_sha} + -P ${PROJECT_SOURCE_DIR}/cmake/CheckTemplate.cmake + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + ) + + set_target_properties(check-template + PROPERTIES + FOLDER "Maintenance" + EXCLUDE_FROM_DEFAULT_BUILD 1 + ) +endfunction() diff --git a/cmake/RuntimeDependencies.cmake b/cmake/RuntimeDependencies.cmake new file mode 100644 index 0000000..7568b27 --- /dev/null +++ b/cmake/RuntimeDependencies.cmake @@ -0,0 +1,19 @@ + +# +# Default dependencies for the runtime-package +# + +# Install 3rd-party runtime dependencies into runtime-component +# install(FILES ... COMPONENT runtime) + + +# +# Full dependencies for self-contained packages +# + +if(OPTION_SELF_CONTAINED) + + # Install 3rd-party runtime dependencies into runtime-component + # install(FILES ... COMPONENT runtime) + +endif() diff --git a/configure b/configure new file mode 100755 index 0000000..18be4ea --- /dev/null +++ b/configure @@ -0,0 +1,126 @@ +#!/bin/bash + +# Default options +BUILD_DIR="build" +CMAKE_GENERATOR="Unix Makefiles" +BUILD_TYPE="Release" +CMAKE_OPTIONS="$CMAKE_OPTIONS" + +# Create default configs +if [ ! -d "./.localconfig" ] +then + mkdir ".localconfig" + + touch ".localconfig/default" + echo "#!/bin/bash" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# Default configuration for configure (is always sourced)" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# CMake generator" >> ".localconfig/default" + echo "CMAKE_GENERATOR=\"Unix Makefiles\"" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# Build directory and build type" >> ".localconfig/default" + echo "BUILD_DIR=\"build\"" >> ".localconfig/default" + echo "BUILD_TYPE=\"Release\"" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# Installation directory" >> ".localconfig/default" + echo "#CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=../install\"" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# Build static libraries" >> ".localconfig/default" + echo "#CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF\"" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# Enable examples" >> ".localconfig/default" + echo "#CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DOPTION_BUILD_EXAMPLES:BOOL=ON\"" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# Enable documentation" >> ".localconfig/default" + echo "#CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DOPTION_BUILD_DOCS:BOOL=ON\"" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# Disable tests" >> ".localconfig/default" + echo "#CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DOPTION_BUILD_TESTS:BOOL=OFF\"" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# CMake and environment variables (e.g., search paths for external libraries)" >> ".localconfig/default" + echo "" >> ".localconfig/default" + echo "# Qt" >> ".localconfig/default" + echo "#export CMAKE_PREFIX_PATH=\"\${CMAKE_PREFIX_PATH}:/opt/Qt5.2.1/5.2.1/gcc_64/\"" >> ".localconfig/default" + + touch ".localconfig/debug" + echo "#!/bin/bash" >> ".localconfig/debug" + echo "" >> ".localconfig/debug" + echo "# Configuration for debug builds" >> ".localconfig/debug" + echo "" >> ".localconfig/debug" + echo "# Build directory and build type" >> ".localconfig/debug" + echo "BUILD_DIR=\"\${BUILD_DIR}-debug\"" >> ".localconfig/debug" + echo "BUILD_TYPE=\"Debug\"" >> ".localconfig/debug" + + touch ".localconfig/pack" + echo "#!/bin/bash" >> ".localconfig/pack" + echo "" >> ".localconfig/pack" + echo "# Configuration for creating packages" >> ".localconfig/pack" + echo "" >> ".localconfig/pack" + echo "# Installation directory" >> ".localconfig/pack" + echo "CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=/usr\"" >> ".localconfig/pack" + echo "" >> ".localconfig/pack" + echo "# Enable self-contained installation" >> ".localconfig/pack" + echo "#CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DOPTION_SELF_CONTAINED:BOOL=ON\"" >> ".localconfig/pack" + echo "" >> ".localconfig/pack" + echo "# Enable all components for the package" >> ".localconfig/pack" + echo "CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DOPTION_BUILD_EXAMPLES:BOOL=ON\"" >> ".localconfig/pack" + echo "CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DOPTION_BUILD_DOCS:BOOL=ON\"" >> ".localconfig/pack" + echo "CMAKE_OPTIONS=\"\${CMAKE_OPTIONS} -DOPTION_BUILD_TESTS:BOOL=OFF\"" >> ".localconfig/pack" + + echo "Default configuration has been written to .localconfig" + echo "Please review and adjust the configuration, then run again" + echo "" + echo " ./configure $@" + + exit +fi + +# Read local default options +if [ -f "./.localconfig/default" ] +then + . ./.localconfig/default +fi + +# Parse command line arguments +for ARG in "$@" +do + # Read in configuration for that command-line argument + CONFIGFILE="./.localconfig/$ARG" + if [ -f "./.localconfig/$ARG" ] + then + . "./.localconfig/$ARG" + elif [ -f "$HOME/.localconfig/$ARG" ] + then + . "$HOME/.localconfig/$ARG" + else + echo "Configuration \"$ARG\" not found (searched in ./.localconfig and ~/.localconfig)" + fi +done + +# Configure build +echo "Configuring ..." +echo "" + +# Create build directory +if [ ! -d "./$BUILD_DIR" ] +then + mkdir $BUILD_DIR +fi + +# Configure project +cd $BUILD_DIR +cmake -G "$CMAKE_GENERATOR" "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" $CMAKE_OPTIONS .. +if [ $? == 0 ] +then + echo "" + echo "Project configured. To build the project, use"; + echo "" + echo " cmake --build $BUILD_DIR" +else + echo "" + echo "Configuration failed."; +fi + +cd .. diff --git a/deploy/CMakeLists.txt b/deploy/CMakeLists.txt new file mode 100644 index 0000000..86896dd --- /dev/null +++ b/deploy/CMakeLists.txt @@ -0,0 +1,30 @@ + +# +# Target 'pack' +# + +add_custom_target(pack) +set_target_properties(pack PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1) + + +# Install additional runtime dependencies +include(${PROJECT_SOURCE_DIR}/cmake/RuntimeDependencies.cmake) + + +# +# Packages +# + +include(packages/pack-OpenP2P.cmake) + + +# +# Target 'component_install' +# + +add_custom_target( + component_install + COMMAND make preinstall + COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/ComponentInstall.cmake + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) diff --git a/deploy/images/logo.bmp b/deploy/images/logo.bmp new file mode 100644 index 0000000..b6c4b27 Binary files /dev/null and b/deploy/images/logo.bmp differ diff --git a/deploy/images/logo.ico b/deploy/images/logo.ico new file mode 100644 index 0000000..ec39828 Binary files /dev/null and b/deploy/images/logo.ico differ diff --git a/deploy/images/logo.png b/deploy/images/logo.png new file mode 100644 index 0000000..95fae06 Binary files /dev/null and b/deploy/images/logo.png differ diff --git a/deploy/packages/pack-OpenP2P.cmake b/deploy/packages/pack-OpenP2P.cmake new file mode 100644 index 0000000..d6ac6ba --- /dev/null +++ b/deploy/packages/pack-OpenP2P.cmake @@ -0,0 +1,259 @@ + +# +# Check if cpack is available +# + +if(NOT EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") + return() +endif() + + +# +# Output packages +# + +if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") + # Windows installer + set(OPTION_PACK_GENERATOR "NSIS;ZIP" CACHE STRING "Package targets") + set(PACK_COMPONENT_INSTALL ON) + set(PACK_INCLUDE_TOPDIR OFF) +elseif(UNIX AND SYSTEM_DIR_INSTALL) + # System installation packages for unix systems + if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + set(OPTION_PACK_GENERATOR "TGZ;DEB;RPM" CACHE STRING "Package targets") + set(PACK_COMPONENT_INSTALL ON) + set(PACK_INCLUDE_TOPDIR OFF) + else() + set(OPTION_PACK_GENERATOR "TGZ" CACHE STRING "Package targets") + set(PACK_COMPONENT_INSTALL OFF) + set(PACK_INCLUDE_TOPDIR OFF) + endif() +#elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") + # MacOS X disk image + # At the moment, DMG generator and CPACK_INCLUDE_TOPLEVEL_DIRECTORY=ON do not work together. + # Therefore, we disable dmg images for MacOS until we've found a solution +# set(OPTION_PACK_GENERATOR "DragNDrop" CACHE STRING "Package targets") +# set(PACK_COMPONENT_INSTALL OFF) +# set(PACK_INCLUDE_TOPDIR ON) +else() + # Default (portable package for any platform) + set(OPTION_PACK_GENERATOR "ZIP;TGZ" CACHE STRING "Package targets") + set(PACK_COMPONENT_INSTALL OFF) + set(PACK_INCLUDE_TOPDIR ON) +endif() + + +# +# Package components +# + +set(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "${META_PROJECT_NAME} library") +set(CPACK_COMPONENT_RUNTIME_DESCRIPTION "Runtime components for ${META_PROJECT_NAME} library") + +set(CPACK_COMPONENT_DEV_DISPLAY_NAME "C/C++ development files") +set(CPACK_COMPONENT_DEV_DESCRIPTION "Development files for ${META_PROJECT_NAME} library") +set(CPACK_COMPONENT_DEV_DEPENDS runtime) + +set(CPACK_COMPONENTS_ALL runtime dev) + +if (OPTION_BUILD_EXAMPLES) + set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Example applications") + set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Example applications for ${META_PROJECT_NAME} library") + set(CPACK_COMPONENT_EXAMPLES_DEPENDS runtime) + + set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples) +endif() + +if (OPTION_BUILD_DOCS) + set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation") + set(CPACK_COMPONENT_DOCS_DESCRIPTION "Documentation of ${META_PROJECT_NAME} library") + + set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} docs) +endif() + + +# +# Initialize CPack +# + +# Reset CPack configuration +if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") + set(CPACK_IGNORE_FILES "") + set(CPACK_INSTALLED_DIRECTORIES "") + set(CPACK_SOURCE_IGNORE_FILES "") + set(CPACK_SOURCE_INSTALLED_DIRECTORIES "") + set(CPACK_STRIP_FILES "") + set(CPACK_SOURCE_TOPLEVEL_TAG "") + set(CPACK_SOURCE_PACKAGE_FILE_NAME "") + set(CPACK_PACKAGE_RELOCATABLE OFF) + set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY ${PACK_INCLUDE_TOPDIR}) + set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY ${PACK_INCLUDE_TOPDIR}) +endif() + +# Find cpack executable +get_filename_component(CPACK_PATH ${CMAKE_COMMAND} PATH) +set(CPACK_COMMAND "${CPACK_PATH}/cpack") + +# Set install prefix +if(SYSTEM_DIR_INSTALL) + set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") +else() + set(CPACK_PACKAGING_INSTALL_PREFIX "") +endif() + +# Package project +set(project_name ${META_PROJECT_NAME}) # Name of package project +set(project_root ${META_PROJECT_NAME}) # Name of root project that is to be installed + +# Package information +string(TOLOWER ${META_PROJECT_NAME} package_name) +set(package_description ${META_PROJECT_DESCRIPTION}) +set(package_vendor ${META_AUTHOR_ORGANIZATION}) +set(package_maintainer ${META_AUTHOR_MAINTAINER}) + +# Package specific options +set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/deploy/packages/${project_name}) + + +# +# Package information +# + +set(CPACK_PACKAGE_NAME "${package_name}") +set(CPACK_PACKAGE_VENDOR "${package_vendor}") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${package_description}") +set(CPACK_PACKAGE_VERSION "${META_VERSION}") +set(CPACK_PACKAGE_VERSION_MAJOR "${META_VERSION_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${META_VERSION_MINOR}") +set(CPACK_PACKAGE_VERSION_PATCH "${META_VERSION_PATCH}") +set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") +set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README.md") +set(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/README.md") +set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md") +set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/deploy/images/logo.bmp") +set(CPACK_PACKAGE_FILE_NAME "${package_name}-${CPACK_PACKAGE_VERSION}") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "${package_name}") +set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${package_name}") + + +# +# NSIS package +# + +# Fix icon path +if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows" AND CPACK_PACKAGE_ICON) + # NOTE: for using MUI (UN)WELCOME images we suggest to replace nsis defaults, + # since there is currently no way to do so without manipulating the installer template (which we won't). + # http://public.kitware.com/pipermail/cmake-developers/2013-January/006243.html + + # SO the following only works for the installer icon, not for the welcome image. + + # NSIS requires "\\" - escaped backslash to work properly. We probably won't rely on this feature, + # so just replacing / with \\ manually. + + #file(TO_NATIVE_PATH "${CPACK_PACKAGE_ICON}" CPACK_PACKAGE_ICON) + string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CPACK_PACKAGE_ICON}") +endif() + +# Fix installation path for x64 builds +if(X64) + # http://public.kitware.com/Bug/view.php?id=9094 + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") +endif() + +# Package options +#set(CPACK_NSIS_DISPLAY_NAME "${package_name}-${META_VERSION}") +set(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/deploy/images/logo.ico") +set(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/deploy/images/logo.ico") + +# Optional Preliminaries (i.e., silent Visual Studio Redistributable install) +if(NOT INSTALL_MSVC_REDIST_FILEPATH) + set(INSTALL_MSVC_REDIST_FILEPATH "" CACHE FILEPATH "Visual C++ Redistributable Installer (note: manual match the selected generator)" FORCE) +endif() + +if(EXISTS ${INSTALL_MSVC_REDIST_FILEPATH}) + get_filename_component(MSVC_REDIST_NAME ${INSTALL_MSVC_REDIST_FILEPATH} NAME) + string(REGEX REPLACE "/" "\\\\\\\\" INSTALL_MSVC_REDIST_FILEPATH ${INSTALL_MSVC_REDIST_FILEPATH}) + list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS " + SetOutPath \\\"$TEMP\\\" + File \\\"${INSTALL_MSVC_REDIST_FILEPATH}\\\" + ExecWait '\\\"$TEMP\\\\${MSVC_REDIST_NAME} /quiet\\\"' + Delete \\\"$TEMP\\\\${MSVC_REDIST_NAME}\\\" + ") +endif() + + +# +# Debian package +# + +set(CPACK_DEBIAN_PACKAGE_NAME "${package_name}") +set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") +set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all") +#set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)") +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${package_maintainer}") +set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") +set(CPACK_DEBIAN_PACKAGE_SECTION "devel") +set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") +#set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "") +#set(CPACK_DEBIAN_PACKAGE_SUGGESTS "") +set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "") +set(CPACK_DEB_COMPONENT_INSTALL ${PACK_COMPONENT_INSTALL}) + + +# +# RPM package +# + +set(CPACK_RPM_PACKAGE_NAME "${package_name}") +set(CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") +set(CPACK_RPM_PACKAGE_RELEASE 1) +set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") +set(CPACK_RPM_PACKAGE_REQUIRES "") +set(CPACK_RPM_PACKAGE_PROVIDES "") +set(CPACK_RPM_PACKAGE_VENDOR "${package_vendor}") +set(CPACK_RPM_PACKAGE_LICENSE "MIT") +set(CPACK_RPM_PACKAGE_SUMMARY "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") +set(CPACK_RPM_PACKAGE_DESCRIPTION "") +set(CPACK_RPM_PACKAGE_GROUP "unknown") +#set(CPACK_RPM_SPEC_INSTALL_POST "") +#set(CPACK_RPM_SPEC_MORE_DEFINE "") +#set(CPACK_RPM_USER_BINARY_SPECFILE "") +#set(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE "") +#set(CPACK_RPM__INSTALL_SCRIPT_FILE "") +#set(CPACK_RPM_PACKAGE_DEBUG 1) +set(CPACK_RPM_PACKAGE_RELOCATABLE OFF) +set(CPACK_RPM_COMPONENT_INSTALL ${PACK_COMPONENT_INSTALL}) + + +# +# Archives (zip, tgz, ...) +# + +set(CPACK_ARCHIVE_COMPONENT_INSTALL ${PACK_COMPONENT_INSTALL}) + + +# +# Execute CPack +# + +set(CPACK_OUTPUT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackConfig-${project_name}.cmake") +set(CPACK_GENERATOR "${OPTION_PACK_GENERATOR}") +set(CPack_CMake_INCLUDED FALSE) +include(CPack) + + +# +# Package target +# + +# Create target +add_custom_target( + pack-${project_name} + COMMAND ${CPACK_COMMAND} --config ${PROJECT_BINARY_DIR}/CPackConfig-${project_name}.cmake -C $ + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) +set_target_properties(pack-${project_name} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1) + +# Set dependencies +add_dependencies(pack pack-${project_name}) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 292688e..7bb7ed0 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -1,4 +1,18 @@ -find_package(LATEX) -include(UseLATEX.cmake) -add_latex_document("OpenP2P.tex" DEFAULT_PDF MANGLE_TARGET_NAMES) -add_latex_document("Root Network.tex" DEFAULT_PDF MANGLE_TARGET_NAMES) + +# +# Target 'docs' +# + +if(NOT OPTION_BUILD_DOCS) + return() +endif() + +add_custom_target(docs) + + +# +# Documentation +# + +add_subdirectory(api-docs) +add_subdirectory(manual) diff --git a/docs/UseLATEX.cmake b/docs/UseLATEX.cmake deleted file mode 100644 index 328dce3..0000000 --- a/docs/UseLATEX.cmake +++ /dev/null @@ -1,1162 +0,0 @@ -# File: UseLATEX.cmake -# CMAKE commands to actually use the LaTeX compiler -# Version: 1.8.1 -# Author: Kenneth Moreland (kmorel at sandia dot gov) -# -# Copyright 2004 Sandia Corporation. -# Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive -# license for use of this work by or on behalf of the -# U.S. Government. Redistribution and use in source and binary forms, with -# or without modification, are permitted provided that this Notice and any -# statement of authorship are reproduced on all copies. -# -# The following MACROS are defined: -# -# ADD_LATEX_DOCUMENT( -# [BIBFILES ] -# [INPUTS ] -# [IMAGE_DIRS] -# [IMAGES] -# [CONFIGURE] -# [DEPENDS] -# [USE_INDEX] [USE_GLOSSARY] [USE_NOMENCL] -# [DEFAULT_PDF] [DEFAULT_SAFEPDF] -# [MANGLE_TARGET_NAMES]) -# Adds targets that compile . The latex output is placed -# in LATEX_OUTPUT_PATH or CMAKE_CURRENT_BINARY_DIR if the former is -# not set. The latex program is picky about where files are located, -# so all input files are copied from the source directory to the -# output directory. This includes the target tex file, any tex file -# listed with the INPUTS option, the bibliography files listed with -# the BIBFILES option, and any .cls, .bst, and .clo files found in -# the current source directory. Images found in the IMAGE_DIRS -# directories or listed by IMAGES are also copied to the output -# directory and coverted to an appropriate format if necessary. Any -# tex files also listed with the CONFIGURE option are also processed -# with the CMake CONFIGURE_FILE command (with the @ONLY flag. Any -# file listed in CONFIGURE but not the target tex file or listed with -# INPUTS has no effect. DEPENDS can be used to specify generated files -# that are needed to compile the latex target. -# -# The following targets are made: -# dvi: Makes .dvi -# pdf: Makes .pdf using pdflatex. -# safepdf: Makes .pdf using ps2pdf. If using the default -# program arguments, this will ensure all fonts are -# embedded and no lossy compression has been performed -# on images. -# ps: Makes .ps -# html: Makes .html -# auxclean: Deletes .aux and other auxiliary files. -# This is sometimes necessary if a LaTeX error occurs -# and writes a bad aux file. Unlike the regular clean -# target, it does not delete other input files, such as -# converted images, to save time on the rebuild. -# -# The dvi target is added to the ALL. That is, it will be the target -# built by default. If the DEFAULT_PDF argument is given, then the -# pdf target will be the default instead of dvi. -# -# If the argument MANGLE_TARGET_NAMES is given, then each of the -# target names above will be mangled with the name. This -# is to make the targets unique if ADD_LATEX_DOCUMENT is called for -# multiple documents. If the argument USE_INDEX is given, then -# commands to build an index are made. If the argument USE_GLOSSARY -# is given, then commands to build a glossary are made. -# -# History: -# -# 1.8.1 Fix problem where ps2pdf was not getting the appropriate arguments. -# -# 1.8.0 Add support for synctex. -# -# 1.7.7 Support calling xindy when making glossaries. -# -# Improved make clean support. -# -# 1.7.6 Add support for the nomencl package (thanks to Myles English). -# -# 1.7.5 Fix issue with bibfiles being copied two different ways, which causes -# Problems with dependencies (thanks to Edwin van Leeuwen). -# -# 1.7.4 Added the DEFAULT_SAFEPDF option (thanks to Raymond Wan). -# -# Added warnings when image directories are not found (and were -# probably not given relative to the source directory). -# -# 1.7.3 Fix some issues with interactions between makeglossaries and bibtex -# (thanks to Mark de Wever). -# -# 1.7.2 Use ps2pdf to convert eps to pdf to get around the problem with -# ImageMagick dropping the bounding box (thanks to Lukasz Lis). -# -# 1.7.1 Fixed some dependency issues. -# -# 1.7.0 Added DEPENDS options (thanks to Theodore Papadopoulo). -# -# 1.6.1 Ported the makeglossaries command to CMake and embedded the port -# into UseLATEX.cmake. -# -# 1.6.0 Allow the use of the makeglossaries command. Thanks to Oystein -# S. Haaland for the patch. -# -# 1.5.0 Allow any type of file in the INPUTS lists, not just tex file -# (suggested by Eric Noulard). As a consequence, the ability to -# specify tex files without the .tex extension is removed. The removed -# function is of dubious value anyway. -# -# When copying input files, skip over any file that exists in the -# binary directory but does not exist in the source directory with the -# assumption that these files were added by some other mechanism. I -# find this useful when creating large documents with multiple -# chapters that I want to build separately (for speed) as I work on -# them. I use the same boilerplate as the starting point for all -# and just copy it with different configurations. This was what the -# separate ADD_LATEX_DOCUMENT method was supposed to originally be for. -# Since its external use is pretty much deprecated, I removed that -# documentation. -# -# 1.4.1 Copy .sty files along with the other class and package files. -# -# 1.4.0 Added a MANGLE_TARGET_NAMES option that will mangle the target names. -# -# Fixed problem with copying bib files that became apparent with -# CMake 2.4. -# -# 1.3.0 Added a LATEX_OUTPUT_PATH variable that allows you or the user to -# specify where the built latex documents to go. This is especially -# handy if you want to do in-source builds. -# -# Removed the ADD_LATEX_IMAGES macro and absorbed the functionality -# into ADD_LATEX_DOCUMENT. The old interface was always kind of -# clunky anyway since you had to specify the image directory in both -# places. It also made supporting LATEX_OUTPUT_PATH problematic. -# -# Added support for jpeg files. -# -# 1.2.0 Changed the configuration options yet again. Removed the NO_CONFIGURE -# Replaced it with a CONFIGURE option that lists input files for which -# configure should be run. -# -# The pdf target no longer depends on the dvi target. This allows you -# to build latex documents that require pdflatex. Also added an option -# to make the pdf target the default one. -# -# 1.1.1 Added the NO_CONFIGURE option. The @ character can be used when -# specifying table column separators. If two or more are used, then -# will incorrectly substitute them. -# -# 1.1.0 Added ability include multiple bib files. Added ability to do copy -# sub-tex files for multipart tex files. -# -# 1.0.0 If both ps and pdf type images exist, just copy the one that -# matches the current render mode. Replaced a bunch of STRING -# commands with GET_FILENAME_COMPONENT commands that were made to do -# the desired function. -# -# 0.4.0 First version posted to CMake Wiki. -# - -############################################################################# -# Find the location of myself while originally executing. If you do this -# inside of a macro, it will recode where the macro was invoked. -############################################################################# -SET(LATEX_USE_LATEX_LOCATION ${CMAKE_CURRENT_LIST_FILE} - CACHE INTERNAL "Location of UseLATEX.cmake file." FORCE - ) - -############################################################################# -# Generic helper macros -############################################################################# - -# Helpful list macros. -MACRO(LATEX_CAR var) - SET(${var} ${ARGV1}) -ENDMACRO(LATEX_CAR) -MACRO(LATEX_CDR var junk) - SET(${var} ${ARGN}) -ENDMACRO(LATEX_CDR) - -MACRO(LATEX_LIST_CONTAINS var value) - SET(${var}) - FOREACH (value2 ${ARGN}) - IF (${value} STREQUAL ${value2}) - SET(${var} TRUE) - ENDIF (${value} STREQUAL ${value2}) - ENDFOREACH (value2) -ENDMACRO(LATEX_LIST_CONTAINS) - -# Parse macro arguments. -MACRO(LATEX_PARSE_ARGUMENTS prefix arg_names option_names) - SET(DEFAULT_ARGS) - FOREACH(arg_name ${arg_names}) - SET(${prefix}_${arg_name}) - ENDFOREACH(arg_name) - FOREACH(option ${option_names}) - SET(${prefix}_${option}) - ENDFOREACH(option) - - SET(current_arg_name DEFAULT_ARGS) - SET(current_arg_list) - FOREACH(arg ${ARGN}) - LATEX_LIST_CONTAINS(is_arg_name ${arg} ${arg_names}) - IF (is_arg_name) - SET(${prefix}_${current_arg_name} ${current_arg_list}) - SET(current_arg_name ${arg}) - SET(current_arg_list) - ELSE (is_arg_name) - LATEX_LIST_CONTAINS(is_option ${arg} ${option_names}) - IF (is_option) - SET(${prefix}_${arg} TRUE) - ELSE (is_option) - SET(current_arg_list ${current_arg_list} ${arg}) - ENDIF (is_option) - ENDIF (is_arg_name) - ENDFOREACH(arg) - SET(${prefix}_${current_arg_name} ${current_arg_list}) -ENDMACRO(LATEX_PARSE_ARGUMENTS) - -# Match the contents of a file to a regular expression. -MACRO(LATEX_FILE_MATCH variable filename regexp default) - # The FILE STRINGS command would be a bit better, but it's not supported on - # older versions of CMake. - FILE(READ ${filename} file_contents) - STRING(REGEX MATCHALL "${regexp}" - ${variable} ${file_contents} - ) - IF (NOT ${variable}) - SET(${variable} "${default}") - ENDIF (NOT ${variable}) -ENDMACRO(LATEX_FILE_MATCH) - -############################################################################# -# Macros that perform processing during a LaTeX build. -############################################################################# -MACRO(LATEX_MAKEGLOSSARIES) - # This is really a bare bones port of the makeglossaries perl script into - # CMake scripting. - MESSAGE("**************************** In makeglossaries") - IF (NOT LATEX_TARGET) - MESSAGE(SEND_ERROR "Need to define LATEX_TARGET") - ENDIF (NOT LATEX_TARGET) - - SET(aux_file ${LATEX_TARGET}.aux) - - IF (NOT EXISTS ${aux_file}) - MESSAGE(SEND_ERROR "${aux_file} does not exist. Run latex on your target file.") - ENDIF (NOT EXISTS ${aux_file}) - - LATEX_FILE_MATCH(newglossary_lines ${aux_file} - "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" - "@newglossary{main}{glg}{gls}{glo}" - ) - - LATEX_FILE_MATCH(istfile_line ${aux_file} - "@istfilename[ \t]*{([^}]*)}" - "@istfilename{${LATEX_TARGET}.ist}" - ) - STRING(REGEX REPLACE "@istfilename[ \t]*{([^}]*)}" "\\1" - istfile ${istfile_line} - ) - - STRING(REGEX MATCH ".*\\.xdy" use_xindy "${istfile}") - IF (use_xindy) - MESSAGE("*************** Using xindy") - IF (NOT XINDY_COMPILER) - MESSAGE(SEND_ERROR "Need to define XINDY_COMPILER") - ENDIF (NOT XINDY_COMPILER) - ELSE (use_xindy) - MESSAGE("*************** Using makeindex") - IF (NOT MAKEINDEX_COMPILER) - MESSAGE(SEND_ERROR "Need to define MAKEINDEX_COMPILER") - ENDIF (NOT MAKEINDEX_COMPILER) - ENDIF (use_xindy) - - FOREACH(newglossary ${newglossary_lines}) - STRING(REGEX REPLACE - "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" - "\\1" glossary_name ${newglossary} - ) - STRING(REGEX REPLACE - "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" - "${LATEX_TARGET}.\\2" glossary_log ${newglossary} - ) - STRING(REGEX REPLACE - "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" - "${LATEX_TARGET}.\\3" glossary_out ${newglossary} - ) - STRING(REGEX REPLACE - "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" - "${LATEX_TARGET}.\\4" glossary_in ${newglossary} - ) - - IF (use_xindy) - LATEX_FILE_MATCH(xdylanguage_line ${aux_file} - "@xdylanguage[ \t]*{${glossary_name}}{([^}]*)}" - "@xdylanguage{${glossary_name}}{english}" - ) - STRING(REGEX REPLACE - "@xdylanguage[ \t]*{${glossary_name}}{([^}]*)}" - "\\1" - language - ${xdylanguage_line} - ) - # What crazy person makes a LaTeX index generater that uses different - # identifiers for language than babel (or at least does not support - # the old ones)? - IF (${language} STREQUAL "frenchb") - SET(language "french") - ELSEIF (${language} MATCHES "^n?germanb?$") - SET(language "german") - ELSEIF (${language} STREQUAL "magyar") - SET(language "hungarian") - ELSEIF (${language} STREQUAL "lsorbian") - SET(language "lower-sorbian") - ELSEIF (${language} STREQUAL "norsk") - SET(language "norwegian") - ELSEIF (${language} STREQUAL "portuges") - SET(language "portuguese") - ELSEIF (${language} STREQUAL "russianb") - SET(language "russian") - ELSEIF (${language} STREQUAL "slovene") - SET(language "slovenian") - ELSEIF (${language} STREQUAL "ukraineb") - SET(language "ukrainian") - ELSEIF (${language} STREQUAL "usorbian") - SET(language "upper-sorbian") - ENDIF (${language} STREQUAL "frenchb") - IF (language) - SET(language_flags "-L ${language}") - ELSE (language) - SET(language_flags "") - ENDIF (language) - - LATEX_FILE_MATCH(codepage_line ${aux_file} - "@gls@codepage[ \t]*{${glossary_name}}{([^}]*)}" - "@gls@codepage{${glossary_name}}{utf}" - ) - STRING(REGEX REPLACE - "@gls@codepage[ \t]*{${glossary_name}}{([^}]*)}" - "\\1" - codepage - ${codepage_line} - ) - IF (codepage) - SET(codepage_flags "-C ${codepage}") - ELSE (codepage) - # Ideally, we would check that the language is compatible with the - # default codepage, but I'm hoping that distributions will be smart - # enough to specify their own codepage. I know, it's asking a lot. - SET(codepage_flags "") - ENDIF (codepage) - - MESSAGE("${XINDY_COMPILER} ${MAKEGLOSSARIES_COMPILER_FLAGS} ${language_flags} ${codepage_flags} -I xindy -M ${glossary_name} -t ${glossary_log} -o ${glossary_out} ${glossary_in}" - ) - EXEC_PROGRAM(${XINDY_COMPILER} - ARGS ${MAKEGLOSSARIES_COMPILER_FLAGS} - ${language_flags} - ${codepage_flags} - -I xindy - -M ${glossary_name} - -t ${glossary_log} - -o ${glossary_out} - ${glossary_in} - OUTPUT_VARIABLE xindy_output - ) - MESSAGE("${xindy_output}") - - # So, it is possible (perhaps common?) for aux files to specify a - # language and codepage that are incompatible with each other. Check - # for that condition, and if it happens run again with the default - # codepage. - IF ("${xindy_output}" MATCHES "^Cannot locate xindy module for language (.+) in codepage (.+)\\.$") - MESSAGE("*************** Retrying xindy with default codepage.") - EXEC_PROGRAM(${XINDY_COMPILER} - ARGS ${MAKEGLOSSARIES_COMPILER_FLAGS} - ${language_flags} - -I xindy - -M ${glossary_name} - -t ${glossary_log} - -o ${glossary_out} - ${glossary_in} - ) - ENDIF ("${xindy_output}" MATCHES "^Cannot locate xindy module for language (.+) in codepage (.+)\\.$") - #ENDIF ("${xindy_output}" MATCHES "Cannot locate xindy module for language (.+) in codepage (.+)\\.") - - ELSE (use_xindy) - MESSAGE("${MAKEINDEX_COMPILER} ${MAKEGLOSSARIES_COMPILER_FLAGS} -s ${istfile} -t ${glossary_log} -o ${glossary_out} ${glossary_in}") - EXEC_PROGRAM(${MAKEINDEX_COMPILER} ARGS ${MAKEGLOSSARIES_COMPILER_FLAGS} - -s ${istfile} -t ${glossary_log} -o ${glossary_out} ${glossary_in} - ) - ENDIF (use_xindy) - - ENDFOREACH(newglossary) -ENDMACRO(LATEX_MAKEGLOSSARIES) - -MACRO(LATEX_MAKENOMENCLATURE) - MESSAGE("**************************** In makenomenclature") - IF (NOT LATEX_TARGET) - MESSAGE(SEND_ERROR "Need to define LATEX_TARGET") - ENDIF (NOT LATEX_TARGET) - - IF (NOT MAKEINDEX_COMPILER) - MESSAGE(SEND_ERROR "Need to define MAKEINDEX_COMPILER") - ENDIF (NOT MAKEINDEX_COMPILER) - - SET(nomencl_out ${LATEX_TARGET}.nls) - SET(nomencl_in ${LATEX_TARGET}.nlo) - - EXEC_PROGRAM(${MAKEINDEX_COMPILER} ARGS ${MAKENOMENCLATURE_COMPILER_FLAGS} - ${nomencl_in} -s "nomencl.ist" -o ${nomencl_out} - ) -ENDMACRO(LATEX_MAKENOMENCLATURE) - -MACRO(LATEX_CORRECT_SYNCTEX) - MESSAGE("**************************** In correct SyncTeX") - IF (NOT LATEX_TARGET) - MESSAGE(SEND_ERROR "Need to define LATEX_TARGET") - ENDIF (NOT LATEX_TARGET) - - IF (NOT GZIP) - MESSAGE(SEND_ERROR "Need to define GZIP") - ENDIF (NOT GZIP) - - IF (NOT LATEX_SOURCE_DIRECTORY) - MESSAGE(SEND_ERROR "Need to define LATEX_SOURCE_DIRECTORY") - ENDIF (NOT LATEX_SOURCE_DIRECTORY) - - IF (NOT LATEX_BINARY_DIRECTORY) - MESSAGE(SEND_ERROR "Need to define LATEX_BINARY_DIRECTORY") - ENDIF (NOT LATEX_BINARY_DIRECTORY) - - SET(synctex_file ${LATEX_BINARY_DIRECTORY}/${LATEX_TARGET}.synctex) - SET(synctex_file_gz ${synctex_file}.gz) - - IF (EXISTS ${synctex_file_gz}) - - MESSAGE("Making backup of synctex file.") - CONFIGURE_FILE(${synctex_file_gz} ${synctex_file}.bak.gz COPYONLY) - - MESSAGE("Uncompressing synctex file.") - EXEC_PROGRAM(${GZIP} - ARGS --decompress ${synctex_file_gz} - ) - - MESSAGE("Reading synctex file.") - FILE(READ ${synctex_file} synctex_data) - - MESSAGE("Replacing relative with absolute paths.") - STRING(REGEX REPLACE - "(Input:[0-9]+:)([^/\n][^\n]*)" - "\\1${LATEX_SOURCE_DIRECTORY}/\\2" - synctex_data - "${synctex_data}" - ) - - MESSAGE("Writing synctex file.") - FILE(WRITE ${synctex_file} "${synctex_data}") - - MESSAGE("Compressing synctex file.") - EXEC_PROGRAM(${GZIP} - ARGS ${synctex_file} - ) - - ELSE (EXISTS ${synctex_file_gz}) - - MESSAGE(SEND_ERROR "File ${synctex_file_gz} not found. Perhaps synctex is not supported by your LaTeX compiler.") - - ENDIF (EXISTS ${synctex_file_gz}) - -ENDMACRO(LATEX_CORRECT_SYNCTEX) - -############################################################################# -# Helper macros for establishing LaTeX build. -############################################################################# - -MACRO(LATEX_NEEDIT VAR NAME) - IF (NOT ${VAR}) - MESSAGE(SEND_ERROR "I need the ${NAME} command.") - ENDIF(NOT ${VAR}) -ENDMACRO(LATEX_NEEDIT) - -MACRO(LATEX_WANTIT VAR NAME) - IF (NOT ${VAR}) - MESSAGE(STATUS "I could not find the ${NAME} command.") - ENDIF(NOT ${VAR}) -ENDMACRO(LATEX_WANTIT) - -MACRO(LATEX_SETUP_VARIABLES) - SET(LATEX_OUTPUT_PATH "${LATEX_OUTPUT_PATH}" - CACHE PATH "If non empty, specifies the location to place LaTeX output." - ) - - FIND_PACKAGE(LATEX) - - FIND_PROGRAM(XINDY_COMPILER - NAME xindy - PATHS ${MIKTEX_BINARY_PATH} /usr/bin - ) - - FIND_PACKAGE(UnixCommands) - - MARK_AS_ADVANCED(CLEAR - LATEX_COMPILER - PDFLATEX_COMPILER - BIBTEX_COMPILER - MAKEINDEX_COMPILER - XINDY_COMPILER - DVIPS_CONVERTER - PS2PDF_CONVERTER - LATEX2HTML_CONVERTER - ) - - LATEX_NEEDIT(LATEX_COMPILER latex) - LATEX_WANTIT(PDFLATEX_COMPILER pdflatex) - LATEX_NEEDIT(BIBTEX_COMPILER bibtex) - LATEX_NEEDIT(MAKEINDEX_COMPILER makeindex) - LATEX_WANTIT(DVIPS_CONVERTER dvips) - LATEX_WANTIT(PS2PDF_CONVERTER ps2pdf) - LATEX_WANTIT(LATEX2HTML_CONVERTER latex2html) - - SET(LATEX_COMPILER_FLAGS "-interaction=nonstopmode" - CACHE STRING "Flags passed to latex.") - SET(PDFLATEX_COMPILER_FLAGS ${LATEX_COMPILER_FLAGS} - CACHE STRING "Flags passed to pdflatex.") - SET(LATEX_SYNCTEX_FLAGS "-synctex=1" - CACHE STRING "latex/pdflatex flags used to create synctex file.") - SET(BIBTEX_COMPILER_FLAGS "" - CACHE STRING "Flags passed to bibtex.") - SET(MAKEINDEX_COMPILER_FLAGS "" - CACHE STRING "Flags passed to makeindex.") - SET(MAKEGLOSSARIES_COMPILER_FLAGS "" - CACHE STRING "Flags passed to makeglossaries.") - SET(MAKENOMENCLATURE_COMPILER_FLAGS "" - CACHE STRING "Flags passed to makenomenclature.") - SET(DVIPS_CONVERTER_FLAGS "-Ppdf -G0 -t letter" - CACHE STRING "Flags passed to dvips.") - SET(PS2PDF_CONVERTER_FLAGS "-dMaxSubsetPct=100 -dCompatibilityLevel=1.3 -dSubsetFonts=true -dEmbedAllFonts=true -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dMonoImageFilter=/FlateEncode" - CACHE STRING "Flags passed to ps2pdf.") - SET(LATEX2HTML_CONVERTER_FLAGS "" - CACHE STRING "Flags passed to latex2html.") - MARK_AS_ADVANCED( - LATEX_COMPILER_FLAGS - PDFLATEX_COMPILER_FLAGS - LATEX_SYNCTEX_FLAGS - BIBTEX_COMPILER_FLAGS - MAKEINDEX_COMPILER_FLAGS - MAKEGLOSSARIES_COMPILER_FLAGS - MAKENOMENCLATURE_COMPILER_FLAGS - DVIPS_CONVERTER_FLAGS - PS2PDF_CONVERTER_FLAGS - LATEX2HTML_CONVERTER_FLAGS - ) - SEPARATE_ARGUMENTS(LATEX_COMPILER_FLAGS) - SEPARATE_ARGUMENTS(PDFLATEX_COMPILER_FLAGS) - SEPARATE_ARGUMENTS(LATEX_SYNCTEX_FLAGS) - SEPARATE_ARGUMENTS(BIBTEX_COMPILER_FLAGS) - SEPARATE_ARGUMENTS(MAKEINDEX_COMPILER_FLAGS) - SEPARATE_ARGUMENTS(MAKEGLOSSARIES_COMPILER_FLAGS) - SEPARATE_ARGUMENTS(MAKENOMENCLATURE_COMPILER_FLAGS) - SEPARATE_ARGUMENTS(DVIPS_CONVERTER_FLAGS) - SEPARATE_ARGUMENTS(PS2PDF_CONVERTER_FLAGS) - SEPARATE_ARGUMENTS(LATEX2HTML_CONVERTER_FLAGS) - - FIND_PROGRAM(IMAGEMAGICK_CONVERT convert - DOC "The convert program that comes with ImageMagick (available at http://www.imagemagick.org)." - ) - IF (NOT IMAGEMAGICK_CONVERT) - MESSAGE(SEND_ERROR "Could not find convert program. Please download ImageMagick from http://www.imagemagick.org and install.") - ENDIF (NOT IMAGEMAGICK_CONVERT) - - OPTION(LATEX_USE_SYNCTEX - "If on, have LaTeX generate a synctex file, which WYSIWYG editors can use to correlate output files like dvi and pdf with the lines of LaTeX source that generates them. In addition to adding the LATEX_SYNCTEX_FLAGS to the command line, this option also adds build commands that \"corrects\" the resulting synctex file to point to the original LaTeX files rather than those generated by UseLATEX.cmake." - OFF - ) - - OPTION(LATEX_SMALL_IMAGES - "If on, the raster images will be converted to 1/6 the original size. This is because papers usually require 600 dpi images whereas most monitors only require at most 96 dpi. Thus, smaller images make smaller files for web distributation and can make it faster to read dvi files." - OFF) - IF (LATEX_SMALL_IMAGES) - SET(LATEX_RASTER_SCALE 16) - SET(LATEX_OPPOSITE_RASTER_SCALE 100) - ELSE (LATEX_SMALL_IMAGES) - SET(LATEX_RASTER_SCALE 100) - SET(LATEX_OPPOSITE_RASTER_SCALE 16) - ENDIF (LATEX_SMALL_IMAGES) - - # Just holds extensions for known image types. They should all be lower case. - SET(LATEX_DVI_VECTOR_IMAGE_EXTENSIONS .eps) - SET(LATEX_DVI_RASTER_IMAGE_EXTENSIONS) - SET(LATEX_DVI_IMAGE_EXTENSIONS - ${LATEX_DVI_VECTOR_IMAGE_EXTENSIONS} ${LATEX_DVI_RASTER_IMAGE_EXTENSIONS}) - SET(LATEX_PDF_VECTOR_IMAGE_EXTENSIONS .pdf) - SET(LATEX_PDF_RASTER_IMAGE_EXTENSIONS .png .jpeg .jpg) - SET(LATEX_PDF_IMAGE_EXTENSIONS - ${LATEX_PDF_VECTOR_IMAGE_EXTENSIONS} ${LATEX_PDF_RASTER_IMAGE_EXTENSIONS}) - SET(LATEX_IMAGE_EXTENSIONS - ${LATEX_DVI_IMAGE_EXTENSIONS} ${LATEX_PDF_IMAGE_EXTENSIONS}) -ENDMACRO(LATEX_SETUP_VARIABLES) - -MACRO(LATEX_GET_OUTPUT_PATH var) - SET(${var}) - IF (LATEX_OUTPUT_PATH) - IF ("${LATEX_OUTPUT_PATH}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - MESSAGE(SEND_ERROR "You cannot set LATEX_OUTPUT_PATH to the same directory that contains LaTeX input files.") - ELSE ("${LATEX_OUTPUT_PATH}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - SET(${var} "${LATEX_OUTPUT_PATH}") - ENDIF ("${LATEX_OUTPUT_PATH}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - ELSE (LATEX_OUTPUT_PATH) - IF ("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - MESSAGE(SEND_ERROR "LaTeX files must be built out of source or you must set LATEX_OUTPUT_PATH.") - ELSE ("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - SET(${var} "${CMAKE_CURRENT_BINARY_DIR}") - ENDIF ("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - ENDIF (LATEX_OUTPUT_PATH) -ENDMACRO(LATEX_GET_OUTPUT_PATH) - -MACRO(LATEX_ADD_CONVERT_COMMAND output_path input_path output_extension - input_extension flags) - SET (converter ${IMAGEMAGICK_CONVERT}) - SET (convert_flags "") - # ImageMagick has broken eps to pdf conversion - # use ps2pdf instead - IF (${input_extension} STREQUAL ".eps" AND ${output_extension} STREQUAL ".pdf") - IF (PS2PDF_CONVERTER) - SET (converter ${PS2PDF_CONVERTER}) - SET (convert_flags -dEPSCrop ${PS2PDF_CONVERTER_FLAGS}) - ELSE (PS2PDF_CONVERTER) - MESSAGE(SEND_ERROR "Using postscript files with pdflatex requires ps2pdf for conversion.") - ENDIF (PS2PDF_CONVERTER) - ELSE (${input_extension} STREQUAL ".eps" AND ${output_extension} STREQUAL ".pdf") - SET (convert_flags ${flags}) - ENDIF (${input_extension} STREQUAL ".eps" AND ${output_extension} STREQUAL ".pdf") - - ADD_CUSTOM_COMMAND(OUTPUT ${output_path} - COMMAND ${converter} - ARGS ${convert_flags} ${input_path} ${output_path} - DEPENDS ${input_path} - ) -ENDMACRO(LATEX_ADD_CONVERT_COMMAND) - -# Makes custom commands to convert a file to a particular type. -MACRO(LATEX_CONVERT_IMAGE output_files input_file output_extension convert_flags - output_extensions other_files) - SET(input_dir ${CMAKE_CURRENT_SOURCE_DIR}) - LATEX_GET_OUTPUT_PATH(output_dir) - - GET_FILENAME_COMPONENT(extension "${input_file}" EXT) - - STRING(REGEX REPLACE "\\.[^.]*\$" ${output_extension} output_file - "${input_file}") - - LATEX_LIST_CONTAINS(is_type ${extension} ${output_extensions}) - IF (is_type) - IF (convert_flags) - LATEX_ADD_CONVERT_COMMAND(${output_dir}/${output_file} - ${input_dir}/${input_file} ${output_extension} ${extension} - "${convert_flags}") - SET(${output_files} ${${output_files}} ${output_dir}/${output_file}) - ELSE (convert_flags) - # As a shortcut, we can just copy the file. - ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${input_file} - COMMAND ${CMAKE_COMMAND} - ARGS -E copy ${input_dir}/${input_file} ${output_dir}/${input_file} - DEPENDS ${input_dir}/${input_file} - ) - SET(${output_files} ${${output_files}} ${output_dir}/${input_file}) - ENDIF (convert_flags) - ELSE (is_type) - SET(do_convert TRUE) - # Check to see if there is another input file of the appropriate type. - FOREACH(valid_extension ${output_extensions}) - STRING(REGEX REPLACE "\\.[^.]*\$" ${output_extension} try_file - "${input_file}") - LATEX_LIST_CONTAINS(has_native_file "${try_file}" ${other_files}) - IF (has_native_file) - SET(do_convert FALSE) - ENDIF (has_native_file) - ENDFOREACH(valid_extension) - - # If we still need to convert, do it. - IF (do_convert) - LATEX_ADD_CONVERT_COMMAND(${output_dir}/${output_file} - ${input_dir}/${input_file} ${output_extension} ${extension} - "${convert_flags}") - SET(${output_files} ${${output_files}} ${output_dir}/${output_file}) - ENDIF (do_convert) - ENDIF (is_type) -ENDMACRO(LATEX_CONVERT_IMAGE) - -# Adds custom commands to process the given files for dvi and pdf builds. -# Adds the output files to the given variables (does not replace). -MACRO(LATEX_PROCESS_IMAGES dvi_outputs pdf_outputs) - LATEX_GET_OUTPUT_PATH(output_dir) - FOREACH(file ${ARGN}) - IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${file}") - GET_FILENAME_COMPONENT(extension "${file}" EXT) - SET(convert_flags) - - # Check to see if we need to downsample the image. - LATEX_LIST_CONTAINS(is_raster extension - ${LATEX_DVI_RASTER_IMAGE_EXTENSIONS} - ${LATEX_PDF_RASTER_IMAGE_EXTENSIONS}) - IF (LATEX_SMALL_IMAGES) - IF (is_raster) - SET(convert_flags -resize ${LATEX_RASTER_SCALE}%) - ENDIF (is_raster) - ENDIF (LATEX_SMALL_IMAGES) - - # Make sure the output directory exists. - GET_FILENAME_COMPONENT(path "${output_dir}/${file}" PATH) - MAKE_DIRECTORY("${path}") - - # Do conversions for dvi. - LATEX_CONVERT_IMAGE(${dvi_outputs} "${file}" .eps "${convert_flags}" - "${LATEX_DVI_IMAGE_EXTENSIONS}" "${ARGN}") - - # Do conversions for pdf. - IF (is_raster) - LATEX_CONVERT_IMAGE(${pdf_outputs} "${file}" .png "${convert_flags}" - "${LATEX_PDF_IMAGE_EXTENSIONS}" "${ARGN}") - ELSE (is_raster) - LATEX_CONVERT_IMAGE(${pdf_outputs} "${file}" .pdf "${convert_flags}" - "${LATEX_PDF_IMAGE_EXTENSIONS}" "${ARGN}") - ENDIF (is_raster) - ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${file}") - MESSAGE(WARNING "Could not find file ${CMAKE_CURRENT_SOURCE_DIR}/${file}. Are you sure you gave relative paths to IMAGES?") - ENDIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${file}") - ENDFOREACH(file) -ENDMACRO(LATEX_PROCESS_IMAGES) - -MACRO(ADD_LATEX_IMAGES) - MESSAGE("The ADD_LATEX_IMAGES macro is deprecated. Image directories are specified with LATEX_ADD_DOCUMENT.") -ENDMACRO(ADD_LATEX_IMAGES) - -MACRO(LATEX_COPY_GLOBBED_FILES pattern dest) - FILE(GLOB file_list ${pattern}) - FOREACH(in_file ${file_list}) - GET_FILENAME_COMPONENT(out_file ${in_file} NAME) - CONFIGURE_FILE(${in_file} ${dest}/${out_file} COPYONLY) - ENDFOREACH(in_file) -ENDMACRO(LATEX_COPY_GLOBBED_FILES) - -MACRO(LATEX_COPY_INPUT_FILE file) - LATEX_GET_OUTPUT_PATH(output_dir) - - IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) - GET_FILENAME_COMPONENT(path ${file} PATH) - FILE(MAKE_DIRECTORY ${output_dir}/${path}) - - LATEX_LIST_CONTAINS(use_config ${file} ${LATEX_CONFIGURE}) - IF (use_config) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${output_dir}/${file} - @ONLY - ) - ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${file} - COMMAND ${CMAKE_COMMAND} - ARGS ${CMAKE_BINARY_DIR} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ) - ELSE (use_config) - ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${file} - COMMAND ${CMAKE_COMMAND} - ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${output_dir}/${file} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ) - ENDIF (use_config) - ELSE (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) - IF (EXISTS ${output_dir}/${file}) - # Special case: output exists but input does not. Assume that it was - # created elsewhere and skip the input file copy. - ELSE (EXISTS ${output_dir}/${file}) - MESSAGE("Could not find input file ${CMAKE_CURRENT_SOURCE_DIR}/${file}") - ENDIF (EXISTS ${output_dir}/${file}) - ENDIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) -ENDMACRO(LATEX_COPY_INPUT_FILE) - -############################################################################# -# Commands provided by the UseLATEX.cmake "package" -############################################################################# - -MACRO(LATEX_USAGE command message) - MESSAGE(SEND_ERROR - "${message}\nUsage: ${command}(\n [BIBFILES ...]\n [INPUTS ...]\n [IMAGE_DIRS ...]\n [IMAGES \n [CONFIGURE ...]\n [DEPENDS ...]\n [USE_INDEX] [USE_GLOSSARY] [USE_NOMENCL]\n [DEFAULT_PDF] [DEFAULT_SAFEPDF]\n [MANGLE_TARGET_NAMES])" - ) -ENDMACRO(LATEX_USAGE command message) - -# Parses arguments to ADD_LATEX_DOCUMENT and ADD_LATEX_TARGETS and sets the -# variables LATEX_TARGET, LATEX_IMAGE_DIR, LATEX_BIBFILES, LATEX_DEPENDS, and -# LATEX_INPUTS. -MACRO(PARSE_ADD_LATEX_ARGUMENTS command) - LATEX_PARSE_ARGUMENTS( - LATEX - "BIBFILES;INPUTS;IMAGE_DIRS;IMAGES;CONFIGURE;DEPENDS" - "USE_INDEX;USE_GLOSSARY;USE_GLOSSARIES;USE_NOMENCL;DEFAULT_PDF;DEFAULT_SAFEPDF;MANGLE_TARGET_NAMES" - ${ARGN} - ) - - # The first argument is the target latex file. - IF (LATEX_DEFAULT_ARGS) - LATEX_CAR(LATEX_MAIN_INPUT ${LATEX_DEFAULT_ARGS}) - LATEX_CDR(LATEX_DEFAULT_ARGS ${LATEX_DEFAULT_ARGS}) - GET_FILENAME_COMPONENT(LATEX_TARGET ${LATEX_MAIN_INPUT} NAME_WE) - ELSE (LATEX_DEFAULT_ARGS) - LATEX_USAGE(${command} "No tex file target given to ${command}.") - ENDIF (LATEX_DEFAULT_ARGS) - - IF (LATEX_DEFAULT_ARGS) - LATEX_USAGE(${command} "Invalid or depricated arguments: ${LATEX_DEFAULT_ARGS}") - ENDIF (LATEX_DEFAULT_ARGS) - - # Backward compatibility between 1.6.0 and 1.6.1. - IF (LATEX_USE_GLOSSARIES) - SET(LATEX_USE_GLOSSARY TRUE) - ENDIF (LATEX_USE_GLOSSARIES) -ENDMACRO(PARSE_ADD_LATEX_ARGUMENTS) - -MACRO(ADD_LATEX_TARGETS) - LATEX_GET_OUTPUT_PATH(output_dir) - PARSE_ADD_LATEX_ARGUMENTS(ADD_LATEX_TARGETS ${ARGV}) - - IF (LATEX_USE_SYNCTEX) - SET(synctex_flags ${LATEX_SYNCTEX_FLAGS}) - ELSE (LATEX_USE_SYNCTEX) - SET(synctex_flags) - ENDIF (LATEX_USE_SYNCTEX) - - # The commands to run LaTeX. They are repeated multiple times. - SET(latex_build_command - ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${synctex_flags} ${LATEX_MAIN_INPUT} - ) - SET(pdflatex_build_command - ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${synctex_flags} ${LATEX_MAIN_INPUT} - ) - - # Set up target names. - IF (LATEX_MANGLE_TARGET_NAMES) - SET(dvi_target ${LATEX_TARGET}_dvi) - SET(pdf_target ${LATEX_TARGET}_pdf) - SET(ps_target ${LATEX_TARGET}_ps) - SET(safepdf_target ${LATEX_TARGET}_safepdf) - SET(html_target ${LATEX_TARGET}_html) - SET(auxclean_target ${LATEX_TARGET}_auxclean) - ELSE (LATEX_MANGLE_TARGET_NAMES) - SET(dvi_target dvi) - SET(pdf_target pdf) - SET(ps_target ps) - SET(safepdf_target safepdf) - SET(html_target html) - SET(auxclean_target auxclean) - ENDIF (LATEX_MANGLE_TARGET_NAMES) - - # Probably not all of these will be generated, but they could be. - # Note that the aux file is added later. - SET(auxiliary_clean_files - ${output_dir}/${LATEX_TARGET}.bbl - ${output_dir}/${LATEX_TARGET}.blg - ${output_dir}/${LATEX_TARGET}-blx.bib - ${output_dir}/${LATEX_TARGET}.glg - ${output_dir}/${LATEX_TARGET}.glo - ${output_dir}/${LATEX_TARGET}.gls - ${output_dir}/${LATEX_TARGET}.idx - ${output_dir}/${LATEX_TARGET}.ilg - ${output_dir}/${LATEX_TARGET}.ind - ${output_dir}/${LATEX_TARGET}.ist - ${output_dir}/${LATEX_TARGET}.log - ${output_dir}/${LATEX_TARGET}.out - ${output_dir}/${LATEX_TARGET}.toc - ${output_dir}/${LATEX_TARGET}.lof - ${output_dir}/${LATEX_TARGET}.xdy - ${output_dir}/${LATEX_TARGET}.synctex.gz - ${output_dir}/${LATEX_TARGET}.synctex.bak.gz - ${output_dir}/${LATEX_TARGET}.dvi - ${output_dir}/${LATEX_TARGET}.ps - ${output_dir}/${LATEX_TARGET}.pdf - ) - - # For each directory in LATEX_IMAGE_DIRS, glob all the image files and - # place them in LATEX_IMAGES. - FOREACH(dir ${LATEX_IMAGE_DIRS}) - FOREACH(extension ${LATEX_IMAGE_EXTENSIONS}) - IF (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dir}) - MESSAGE(WARNING "Image directory ${CMAKE_CURRENT_SOURCE_DIR}/${dir} does not exist. Are you sure you gave relative directories to IMAGE_DIRS?") - ENDIF (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dir}) - FILE(GLOB files ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*${extension}) - FOREACH(file ${files}) - GET_FILENAME_COMPONENT(filename ${file} NAME) - SET(LATEX_IMAGES ${LATEX_IMAGES} ${dir}/${filename}) - ENDFOREACH(file) - ENDFOREACH(extension) - ENDFOREACH(dir) - - SET(dvi_images) - SET(pdf_images) - LATEX_PROCESS_IMAGES(dvi_images pdf_images ${LATEX_IMAGES}) - - SET(make_dvi_command - ${CMAKE_COMMAND} -E chdir ${output_dir} - ${latex_build_command}) - SET(make_pdf_command - ${CMAKE_COMMAND} -E chdir ${output_dir} - ${pdflatex_build_command} - ) - - SET(make_dvi_depends ${LATEX_DEPENDS} ${dvi_images}) - SET(make_pdf_depends ${LATEX_DEPENDS} ${pdf_images}) - FOREACH(input ${LATEX_MAIN_INPUT} ${LATEX_INPUTS}) - SET(make_dvi_depends ${make_dvi_depends} ${output_dir}/${input}) - SET(make_pdf_depends ${make_pdf_depends} ${output_dir}/${input}) - IF (${input} MATCHES "\\.tex$") - STRING(REGEX REPLACE "\\.tex$" "" input_we ${input}) - SET(auxiliary_clean_files ${auxiliary_clean_files} - ${output_dir}/${input_we}.aux - ${output_dir}/${input}.aux - ) - ENDIF (${input} MATCHES "\\.tex$") - ENDFOREACH(input) - - IF (LATEX_USE_GLOSSARY) - FOREACH(dummy 0 1) # Repeat these commands twice. - SET(make_dvi_command ${make_dvi_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${CMAKE_COMMAND} - -D LATEX_BUILD_COMMAND=makeglossaries - -D LATEX_TARGET=${LATEX_TARGET} - -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} - -D XINDY_COMPILER=${XINDY_COMPILER} - -D MAKEGLOSSARIES_COMPILER_FLAGS=${MAKEGLOSSARIES_COMPILER_FLAGS} - -P ${LATEX_USE_LATEX_LOCATION} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${latex_build_command} - ) - SET(make_pdf_command ${make_pdf_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${CMAKE_COMMAND} - -D LATEX_BUILD_COMMAND=makeglossaries - -D LATEX_TARGET=${LATEX_TARGET} - -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} - -D XINDY_COMPILER=${XINDY_COMPILER} - -D MAKEGLOSSARIES_COMPILER_FLAGS=${MAKEGLOSSARIES_COMPILER_FLAGS} - -P ${LATEX_USE_LATEX_LOCATION} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${pdflatex_build_command} - ) - ENDFOREACH(dummy) - ENDIF (LATEX_USE_GLOSSARY) - - IF (LATEX_USE_NOMENCL) - FOREACH(dummy 0 1) # Repeat these commands twice. - SET(make_dvi_command ${make_dvi_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${CMAKE_COMMAND} - -D LATEX_BUILD_COMMAND=makenomenclature - -D LATEX_TARGET=${LATEX_TARGET} - -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} - -D MAKENOMENCLATURE_COMPILER_FLAGS=${MAKENOMENCLATURE_COMPILER_FLAGS} - -P ${LATEX_USE_LATEX_LOCATION} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${latex_build_command} - ) - SET(make_pdf_command ${make_pdf_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${CMAKE_COMMAND} - -D LATEX_BUILD_COMMAND=makenomenclature - -D LATEX_TARGET=${LATEX_TARGET} - -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} - -D MAKENOMENCLATURE_COMPILER_FLAGS=${MAKENOMENCLATURE_COMPILER_FLAGS} - -P ${LATEX_USE_LATEX_LOCATION} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${pdflatex_build_command} - ) - ENDFOREACH(dummy) - ENDIF (LATEX_USE_NOMENCL) - - IF (LATEX_BIBFILES) - SET(make_dvi_command ${make_dvi_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${BIBTEX_COMPILER} ${BIBTEX_COMPILER_FLAGS} ${LATEX_TARGET}) - SET(make_pdf_command ${make_pdf_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${BIBTEX_COMPILER} ${BIBTEX_COMPILER_FLAGS} ${LATEX_TARGET}) - FOREACH (bibfile ${LATEX_BIBFILES}) - SET(make_dvi_depends ${make_dvi_depends} ${output_dir}/${bibfile}) - SET(make_pdf_depends ${make_pdf_depends} ${output_dir}/${bibfile}) - ENDFOREACH (bibfile ${LATEX_BIBFILES}) - ENDIF (LATEX_BIBFILES) - - IF (LATEX_USE_INDEX) - SET(make_dvi_command ${make_dvi_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${latex_build_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${MAKEINDEX_COMPILER} ${MAKEINDEX_COMPILER_FLAGS} ${LATEX_TARGET}.idx) - SET(make_pdf_command ${make_pdf_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${pdflatex_build_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${MAKEINDEX_COMPILER} ${MAKEINDEX_COMPILER_FLAGS} ${LATEX_TARGET}.idx) - ENDIF (LATEX_USE_INDEX) - - SET(make_dvi_command ${make_dvi_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${latex_build_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${latex_build_command}) - SET(make_pdf_command ${make_pdf_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${pdflatex_build_command} - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${pdflatex_build_command}) - - IF (LATEX_USE_SYNCTEX) - IF (NOT GZIP) - MESSAGE(SEND_ERROR "UseLATEX.cmake: USE_SYNTEX option requires gzip program. Set GZIP variable.") - ENDIF (NOT GZIP) - SET(make_dvi_command ${make_dvi_command} - COMMAND ${CMAKE_COMMAND} - -D LATEX_BUILD_COMMAND=correct_synctex - -D LATEX_TARGET=${LATEX_TARGET} - -D GZIP=${GZIP} - -D "LATEX_SOURCE_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}" - -D "LATEX_BINARY_DIRECTORY=${output_dir}" - -P ${LATEX_USE_LATEX_LOCATION} - ) - SET(make_pdf_command ${make_pdf_command} - COMMAND ${CMAKE_COMMAND} - -D LATEX_BUILD_COMMAND=correct_synctex - -D LATEX_TARGET=${LATEX_TARGET} - -D GZIP=${GZIP} - -D "LATEX_SOURCE_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}" - -D "LATEX_BINARY_DIRECTORY=${output_dir}" - -P ${LATEX_USE_LATEX_LOCATION} - ) - ENDIF (LATEX_USE_SYNCTEX) - - # Add commands and targets for building dvi outputs. - ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${LATEX_TARGET}.dvi - COMMAND ${make_dvi_command} - DEPENDS ${make_dvi_depends} - ) - IF (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF) - ADD_CUSTOM_TARGET(${dvi_target} - DEPENDS ${output_dir}/${LATEX_TARGET}.dvi) - ELSE (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF) - ADD_CUSTOM_TARGET(${dvi_target} ALL - DEPENDS ${output_dir}/${LATEX_TARGET}.dvi) - ENDIF (LATEX_DEFAULT_PDF OR LATEX_DEFAULT_SAFEPDF) - - # Add commands and targets for building pdf outputs (with pdflatex). - IF (PDFLATEX_COMPILER) - ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${LATEX_TARGET}.pdf - COMMAND ${make_pdf_command} - DEPENDS ${make_pdf_depends} - ) - IF (LATEX_DEFAULT_PDF) - ADD_CUSTOM_TARGET(${pdf_target} ALL - DEPENDS ${output_dir}/${LATEX_TARGET}.pdf) - ELSE (LATEX_DEFAULT_PDF) - ADD_CUSTOM_TARGET(${pdf_target} - DEPENDS ${output_dir}/${LATEX_TARGET}.pdf) - ENDIF (LATEX_DEFAULT_PDF) - ENDIF (PDFLATEX_COMPILER) - - IF (DVIPS_CONVERTER) - ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${LATEX_TARGET}.ps - COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} - ${DVIPS_CONVERTER} ${DVIPS_CONVERTER_FLAGS} -o ${LATEX_TARGET}.ps ${LATEX_TARGET}.dvi - DEPENDS ${output_dir}/${LATEX_TARGET}.dvi) - ADD_CUSTOM_TARGET(${ps_target} - DEPENDS ${output_dir}/${LATEX_TARGET}.ps) - IF (PS2PDF_CONVERTER) - # Since both the pdf and safepdf targets have the same output, we - # cannot properly do the dependencies for both. When selecting safepdf, - # simply force a recompile every time. - IF (LATEX_DEFAULT_SAFEPDF) - ADD_CUSTOM_TARGET(${safepdf_target} ALL - ${CMAKE_COMMAND} -E chdir ${output_dir} - ${PS2PDF_CONVERTER} ${PS2PDF_CONVERTER_FLAGS} ${LATEX_TARGET}.ps ${LATEX_TARGET}.pdf - ) - ELSE (LATEX_DEFAULT_SAFEPDF) - ADD_CUSTOM_TARGET(${safepdf_target} - ${CMAKE_COMMAND} -E chdir ${output_dir} - ${PS2PDF_CONVERTER} ${PS2PDF_CONVERTER_FLAGS} ${LATEX_TARGET}.ps ${LATEX_TARGET}.pdf - ) - ENDIF (LATEX_DEFAULT_SAFEPDF) - ADD_DEPENDENCIES(${safepdf_target} ${ps_target}) - ENDIF (PS2PDF_CONVERTER) - ENDIF (DVIPS_CONVERTER) - - IF (LATEX2HTML_CONVERTER) - ADD_CUSTOM_TARGET(${html_target} - ${CMAKE_COMMAND} -E chdir ${output_dir} - ${LATEX2HTML_CONVERTER} ${LATEX2HTML_CONVERTER_FLAGS} ${LATEX_MAIN_INPUT} - ) - ADD_DEPENDENCIES(${html_target} ${LATEX_MAIN_INPUT} ${LATEX_INPUTS}) - ENDIF (LATEX2HTML_CONVERTER) - - SET_DIRECTORY_PROPERTIES(. - ADDITIONAL_MAKE_CLEAN_FILES "${auxiliary_clean_files}" - ) - - ADD_CUSTOM_TARGET(${auxclean_target} - COMMENT "Cleaning auxiliary LaTeX files." - COMMAND ${CMAKE_COMMAND} -E remove ${auxiliary_clean_files} - ) -ENDMACRO(ADD_LATEX_TARGETS) - -MACRO(ADD_LATEX_DOCUMENT) - LATEX_GET_OUTPUT_PATH(output_dir) - IF (output_dir) - PARSE_ADD_LATEX_ARGUMENTS(ADD_LATEX_DOCUMENT ${ARGV}) - - LATEX_COPY_INPUT_FILE(${LATEX_MAIN_INPUT}) - - FOREACH (bib_file ${LATEX_BIBFILES}) - LATEX_COPY_INPUT_FILE(${bib_file}) - ENDFOREACH (bib_file) - - FOREACH (input ${LATEX_INPUTS}) - LATEX_COPY_INPUT_FILE(${input}) - ENDFOREACH(input) - - LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.cls ${output_dir}) - LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.bst ${output_dir}) - LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.clo ${output_dir}) - LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.sty ${output_dir}) - LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.ist ${output_dir}) - - ADD_LATEX_TARGETS(${ARGV}) - ENDIF (output_dir) -ENDMACRO(ADD_LATEX_DOCUMENT) - -############################################################################# -# Actually do stuff -############################################################################# - -IF (LATEX_BUILD_COMMAND) - SET(command_handled) - - IF ("${LATEX_BUILD_COMMAND}" STREQUAL makeglossaries) - LATEX_MAKEGLOSSARIES() - SET(command_handled TRUE) - ENDIF ("${LATEX_BUILD_COMMAND}" STREQUAL makeglossaries) - - IF ("${LATEX_BUILD_COMMAND}" STREQUAL makenomenclature) - LATEX_MAKENOMENCLATURE() - SET(command_handled TRUE) - ENDIF ("${LATEX_BUILD_COMMAND}" STREQUAL makenomenclature) - - IF ("${LATEX_BUILD_COMMAND}" STREQUAL correct_synctex) - LATEX_CORRECT_SYNCTEX() - SET(command_handled TRUE) - ENDIF ("${LATEX_BUILD_COMMAND}" STREQUAL correct_synctex) - - IF (NOT command_handled) - MESSAGE(SEND_ERROR "Unknown command: ${LATEX_BUILD_COMMAND}") - ENDIF (NOT command_handled) - -ELSE (LATEX_BUILD_COMMAND) - # Must be part of the actual configure (included from CMakeLists.txt). - LATEX_SETUP_VARIABLES() -ENDIF (LATEX_BUILD_COMMAND) diff --git a/docs/api-docs/CMakeLists.txt b/docs/api-docs/CMakeLists.txt new file mode 100644 index 0000000..411fa29 --- /dev/null +++ b/docs/api-docs/CMakeLists.txt @@ -0,0 +1,73 @@ + +# +# Find doxygen +# + +find_package(Doxygen) +if(NOT DOXYGEN_FOUND) + message(STATUS "Disabled generation of doxygen documentation (missing doxygen).") + return() +endif() + + +# +# Target name +# + +set(target api-docs) +message(STATUS "Doc ${target}") + + +# +# Input file +# + +set(doxyfile_in doxyfile.in) + + +# +# Create documentation +# + +# Set project variables +set(doxyfile "${CMAKE_CURRENT_BINARY_DIR}/doxyfile") +set(doxyfile_directory "${CMAKE_CURRENT_BINARY_DIR}/html") +set(doxyfile_html "${doxyfile_directory}/index.html") + +# Get filename and path of doxyfile +get_filename_component(name ${doxyfile_in} NAME) +get_filename_component(path ${doxyfile_in} PATH) +if(NOT path) + set(path ${CMAKE_CURRENT_SOURCE_DIR}) +endif() + +# Configure doxyfile (if it is a real doxyfile already, it should simply copy the file) +set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +configure_file(${doxyfile_in} ${doxyfile}) + +# Invoke doxygen +add_custom_command( + OUTPUT ${doxyfile_html} + DEPENDS ${doxyfile} ${META_PROJECT_NAME}::Concurrency ${META_PROJECT_NAME}::Crypt ${META_PROJECT_NAME}::Event ${META_PROJECT_NAME}::FolderSync + ${META_PROJECT_NAME}::IP ${META_PROJECT_NAME}::OFTorrent ${META_PROJECT_NAME}::Root ${META_PROJECT_NAME}::TCP + ${META_PROJECT_NAME}::Transport ${META_PROJECT_NAME}::UDP ${META_PROJECT_NAME}::Util + WORKING_DIRECTORY ${path} + COMMAND ${CMAKE_COMMAND} -E copy_directory ${path} ${doxyfile_directory} # ToDO, configure doxygen to use source as is + COMMAND ${DOXYGEN} \"${doxyfile}\" + COMMENT "Creating doxygen documentation." +) + +# Declare target +add_custom_target(${target} ALL DEPENDS ${doxyfile_html}) +add_dependencies(docs ${target}) + + +# +# Deployment +# + +install( + DIRECTORY ${doxyfile_directory} + DESTINATION ${INSTALL_DOC} + COMPONENT docs +) diff --git a/docs/api-docs/doxyfile.in b/docs/api-docs/doxyfile.in new file mode 100644 index 0000000..14576f1 --- /dev/null +++ b/docs/api-docs/doxyfile.in @@ -0,0 +1,2332 @@ +# Doxyfile 1.8.5 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = @META_PROJECT_NAME@ + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = @META_VERSION_MAJOR@.@META_VERSION_MINOR@.@META_VERSION_PATCH@.@GIT_REV@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# 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 = "@META_PROJECT_DESCRIPTION@" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = @PROJECT_SOURCE_DIR@/deploy/images/logo.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = ${DOXYGEN_OUTPUT_DIRECTORY} + +# 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 +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese- +# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en, +# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, +# Turkish, Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = NO + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class " \ + "The $name widget " \ + "The $name file " \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = ../include + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = YES + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = YES + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = @PROJECT_SOURCE_DIR@/include + +# 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 +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# 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 +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = NO + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = YES + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = PixelLightAPI.chm + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /