#********************************************************************* #** ** #** File : CMakeLists.txt ** #** Authors: Viktor Richter ** #** ** #** ** #** GNU LESSER GENERAL PUBLIC LICENSE ** #** This file may be used under the terms of the GNU Lesser General ** #** Public License version 3.0 as published by the ** #** ** #** Free Software Foundation and appearing in the file LICENSE.LGPL ** #** included in the packaging of this file. Please review the ** #** following information to ensure the license requirements will ** #** be met: http://www.gnu.org/licenses/lgpl-3.0.txt ** #** ** #********************************************************************* cmake_minimum_required(VERSION 2.8.2) # this sets the projects name project(@projectname) # the projects version number set(PROJECT_VERSION_MAJOR 0) set(PROJECT_VERSION_MINOR 1) # some output message(STATUS "") message(STATUS "==============================================================") message(STATUS "Configuring ${PROJECT_NAME}:") # checking build type, setting to release when not set IF(NOT CMAKE_BUILD_TYPE) MESSAGE(STATUS "No Specific build type specified: using Release") SET(CMAKE_BUILD_TYPE "Release") ENDIF() # some compiler flags for the different build settings SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3") SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") # search for icl find_package(ICL REQUIRED HINTS ${ICL_ROOT}) message(STATUS "Looking for doxygen") find_program(DOXYGEN_BIN NAMES doxygen) if(NOT "${DOXYGEN_BIN}" STREQUAL "DOXYGEN_BIN-NOTFOUND") message(STATUS "found Doxygen, a documentation can be built with 'make doc'") add_custom_target(doc COMMAND ${DOXYGEN_BIN} ${PROJECT_BINARY_DIR}/Doxyfile COMMENT "Creating html and tex documentation in doc/" ) install( DIRECTORY ${PROJECT_BINARY_DIR}/doc/html DESTINATION "share/doc/${PROJECT_NAME}/" DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_EXECUTE OWNER_EXECUTE GROUP_EXECUTE FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE ) else() message(STATUS " doxygen not found, documentation will not be available") endif() configure_file( "${PROJECT_SOURCE_DIR}/Doxyfile.in" "${PROJECT_BINARY_DIR}/Doxyfile" ) ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(app)