#######\r
# Dlt - Diagnostic Log and Trace\r
-# @licence make begin@
- #
- # Copyright (C) 2011, BMW AG - Alexander Wenzel <alexander.wenzel@bmw.de>
- #
- # This program is free software; you can redistribute it and/or modify it under the terms of the
- # GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
- # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
- # Public License, version 2.1, for more details.
- #
- # You should have received a copy of the GNU Lesser General Public License, version 2.1, along
- # with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
- #
- # Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may
- # also be applicable to programs even in cases in which the program is not a library in the technical sense.
- #
- # Linking DLT statically or dynamically with other modules is making a combined work based on DLT. You may
- # license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to
- # license your linked modules under the GNU Lesser General Public License, version 2.1, you
- # may use the program under the following exception.
- #
- # As a special exception, the copyright holders of DLT give you permission to combine DLT
- # with software programs or libraries that are released under any license unless such a combination is not
- # permitted by the license of such a software program or library. You may copy and distribute such a
- # system following the terms of the GNU Lesser General Public License, version 2.1, including this
- # special exception, for DLT and the licenses of the other code concerned.
- #
- # Note that people who make modified versions of DLT are not obligated to grant this special exception
- # for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License,
- # version 2.1, gives permission to release a modified version without this exception; this exception
- # also makes it possible to release a modified version which carries forward this exception.
- #
- # @licence end@\r
+# @licence make begin@\r
+#\r
+# Copyright (C) 2011-2012, BMW AG - Alexander Wenzel <alexander.aw.wenzel@bmw.de>\r
+# \r
+# Contributions are licensed to the GENIVI Alliance under one or more\r
+# Contribution License Agreements.\r
+# \r
+# This Source Code Form is subject to the terms of the\r
+# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with\r
+# this file, You can obtain one at http://mozilla.org/MPL/2.0/.\r
+#\r
+# @licence end@\r
########\r
\r
-CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )\r
-MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)\r
+cmake_minimum_required( VERSION 2.6 )\r
+project( automotive-dlt )\r
\r
-SET( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )\r
-\r
-PROJECT( automotive-dlt )\r
+mark_as_advanced( CMAKE_BACKWARDS_COMPATIBILITY)\r
+set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )\r
+set( CMAKE_INSTALL_PREFIX "/usr" )\r
\r
# Set version parameters\r
-SET( ${PROJECT_NAME}_MAJOR_VERSION 2 )\r
-SET( ${PROJECT_NAME}_MINOR_VERSION 2 )\r
-SET( ${PROJECT_NAME}_PATCH_LEVEL 0 )\r
-set(GENIVI_PROJECT_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL})\r
-SET( ${PROJECT_NAME}_VERSION_STATE )\r
-SET( ${PROJECT_NAME}_REVISION 1666 )\r
-\r
-# Write version information into include file\r
-SET( PRINT_MAJOR_VERSION ${${PROJECT_NAME}_MAJOR_VERSION})\r
-SET( PRINT_MINOR_VERSION ${${PROJECT_NAME}_MINOR_VERSION})\r
-SET( PRINT_PATCH_LEVEL ${${PROJECT_NAME}_PATCH_LEVEL})\r
-SET( PRINT_VERSION ${GENIVI_PROJECT_VERSION})\r
-SET( PRINT_VERSION_STATE ${${PROJECT_NAME}_VERSION_STATE})\r
-SET( PRINT_VERSION_REVISION ${${PROJECT_NAME}_REVISION})\r
-\r
-# Print version information\r
-MESSAGE("VERSION ${PRINT_VERSION}")\r
-MESSAGE("VERSION_STATE ${PRINT_VERSION_STATE}")\r
-MESSAGE("REVISION ${PRINT_VERSION_REVISION}")\r
-\r
-##################### RPM CONFIG ########################\r
-\r
-SET( GENIVI_RPM_RELEASE "1${SVN_REVISION}")\r
-SET( LICENSE "LGPL v2.1 with special exception" )\r
-SET( SPEC_DIR "package")\r
-\r
-#########################################################\r
-SET(GENIVI_BUILDSYSTEM_AVAILABLE $ENV{GENIVI_BUILDSYSTEM})\r
-IF(GENIVI_BUILDSYSTEM_AVAILABLE)\r
-INCLUDE($ENV{GENIVI_BUILDSYSTEM}/cmake_extensions/GeniviCMakeExtensions.cmake)\r
-ENDIF(GENIVI_BUILDSYSTEM_AVAILABLE)\r
-\r
-\r
-###################### GPROF Settings ###################\r
-# Adds compile flag for gprof to target\r
-# Run the binary\r
-# Output: gmon.out in build directory\r
-# Run: gprof <path/to/binary> > profile.output\r
-SET( GPROF_DLT_DAEMON OFF )\r
-SET( GPROF_DLT_LIB OFF )\r
-SET( GPROF_DLT_EXAMPLES OFF) \r
-SET( GPROF_DLT_TESTS OFF) \r
-SET( GPROF_DLT_CONSOLE OFF)\r
-SET( GPROF_DLT_ADAPTOR OFF)\r
-\r
-SET( prefix ${CMAKE_INSTALL_PREFIX})\r
-SET( libdir "\${exec_prefix}/lib" )\r
-SET( includedir "\${exec_prefix}/include" )\r
-\r
-SET( DLTBINDIR ${CMAKE_INSTALL_PREFIX}/bin )\r
-SET( DLTLIBDIR ${CMAKE_INSTALL_PREFIX}/lib )\r
-SET( DLTLIBSTATIC ${CMAKE_INSTALL_PREFIX}/lib )\r
-SET( DLTINCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include )\r
-SET( DLTDOCDIR ${CMAKE_INSTALL_PREFIX}/doc ) \r
-\r
-IF(NOT CMAKE_BUILD_TYPE)\r
- SET(CMAKE_BUILD_TYPE RelWithDebInfo)\r
-ENDIF(NOT CMAKE_BUILD_TYPE)\r
-\r
-FIND_PACKAGE(Doxygen)\r
-FIND_PACKAGE(Threads REQUIRED)\r
-\r
-INCLUDE_DIRECTORIES( \r
-${CMAKE_SOURCE_DIR}/\r
-${CMAKE_SOURCE_DIR}/include/dlt\r
-${CMAKE_SOURCE_DIR}/src/shared/ \r
-${CMAKE_SOURCE_DIR}/src/lib/\r
-${CMAKE_SOURCE_DIR}/src/daemon/ )\r
-\r
-ADD_DEFINITIONS( "-Wall" )\r
-\r
-INCLUDE(TestBigEndian)\r
-\r
-TEST_BIG_ENDIAN( DLT_BIGENDIAN )\r
-\r
-IF ( DLT_BIGENDIAN )\r
- ADD_DEFINITIONS( -DBYTE_ORDER=BIG_ENDIAN )\r
-ELSE ( DLT_BIGENDIAN )\r
- ADD_DEFINITIONS( -DBYTE_ORDER=LITTLE_ENDIAN )\r
-ENDIF ( DLT_BIGENDIAN )\r
-\r
-INCLUDE(CheckIncludeFiles) \r
-\r
-CHECK_INCLUDE_FILES( arpa/inet.h HAVE_ARPAINET_H)\r
-CHECK_INCLUDE_FILES( fcntl.h HAVE_FCNTL_H)\r
-CHECK_INCLUDE_FILES( float.h HAVE_FLOAT_H)\r
-CHECK_INCLUDE_FILES( limits.h HAVE_LIMITS_H)\r
-CHECK_INCLUDE_FILES( netdb.h HAVE_NETDB_H)\r
-CHECK_INCLUDE_FILES( netinet/in.h HAVE_NETINETIN_H)\r
-CHECK_INCLUDE_FILES( stddef.h HAVE_STDDEF_H)\r
-CHECK_INCLUDE_FILES( stdint.h HAVE_STDINT_H)\r
-CHECK_INCLUDE_FILES( stdlib.h HAVE_STDLIB_H)\r
-CHECK_INCLUDE_FILES( string.h HAVE_STRING_H)\r
-CHECK_INCLUDE_FILES( strings.h HAVE_STRINGS_H)\r
-CHECK_INCLUDE_FILES( sys/ioctl.h HAVE_SYSIOCTL_H)\r
-CHECK_INCLUDE_FILES( sys/socket.h HAVE_SYSSOCKET_H)\r
-CHECK_INCLUDE_FILES( sys/time.h HAVE_SYSTIME_H)\r
-CHECK_INCLUDE_FILES( unistd.h HAVE_UNISTD_H)\r
-CHECK_INCLUDE_FILES( sys/ipc.h HAVE_SYSIPC_H)\r
-CHECK_INCLUDE_FILES( netdb.h HAVE_NETDB_H)\r
-CHECK_INCLUDE_FILES( ctype.h HAVE_CTYPE_H)\r
-CHECK_INCLUDE_FILES( signal.h HAVE_SIGNAL_H)\r
-CHECK_INCLUDE_FILES( syslog.h HAVE_SYSLOG_H)\r
-CHECK_INCLUDE_FILES( sys/stat.h HAVE_SYSSTAT_H)\r
-CHECK_INCLUDE_FILES( linux/stat.h HAVE_LINUXSTAT_H)\r
-CHECK_INCLUDE_FILES( sys/uio.h HAVE_SYSUIO_H)\r
-CHECK_INCLUDE_FILES( termios.h HAVE_TERMIOS_H)\r
-CHECK_INCLUDE_FILES( unistd.h HAVE_UNISTD_H)\r
-\r
-INCLUDE(CheckFunctionExists) \r
-\r
-CHECK_FUNCTION_EXISTS( bzero HAVE_FUNC_BZERO)\r
-CHECK_FUNCTION_EXISTS( clock_gettime HAVE_FUNC_CLOCKGETTIME)\r
-CHECK_FUNCTION_EXISTS( floor HAVE_FUNC_FLOOR)\r
-CHECK_FUNCTION_EXISTS( fork HAVE_FUNC_FORK)\r
-CHECK_FUNCTION_EXISTS( gethostbyname HAVE_FUNC_GETHOSTBYNAME)\r
-CHECK_FUNCTION_EXISTS( gettimeofday HAVE_FUNC_GETTIMEBYDAY)\r
-CHECK_FUNCTION_EXISTS( inet_ntoa HAVE_FUNC_INETNTOA)\r
-CHECK_FUNCTION_EXISTS( malloc HAVE_FUNC_MALLOC)\r
-CHECK_FUNCTION_EXISTS( memmove HAVE_FUNC_MEMMOVE)\r
-CHECK_FUNCTION_EXISTS( memset HAVE_FUNC_MEMSET)\r
-CHECK_FUNCTION_EXISTS( mkfifo HAVE_FUNC_MKFIFO)\r
-CHECK_FUNCTION_EXISTS( select HAVE_FUNC_SELECT)\r
-CHECK_FUNCTION_EXISTS( socket HAVE_FUNC_SOCKET)\r
-CHECK_FUNCTION_EXISTS( strchr HAVE_FUNC_STRCHR)\r
-CHECK_FUNCTION_EXISTS( strerror HAVE_FUNC_STRERROR)\r
-CHECK_FUNCTION_EXISTS( strstr HAVE_FUNC_STRSTR)\r
-CHECK_FUNCTION_EXISTS( strtol HAVE_FUNC_STRTOL)\r
-\r
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_SOURCE_DIR}/config.h @ONLY)\r
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/svnversion.h.cmake ${CMAKE_SOURCE_DIR}/svnversion.h @ONLY)\r
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/version.h.cmake ${CMAKE_SOURCE_DIR}/version.h @ONLY)\r
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doxygen.cfg.cmake ${CMAKE_SOURCE_DIR}/doxygen.cfg @ONLY)\r
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/automotive-dlt.pc.cmake ${CMAKE_SOURCE_DIR}/automotive-dlt.pc @ONLY)\r
-#CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/package/automotive-dlt.spec.cmake ${CMAKE_SOURCE_DIR}/package/automotive-dlt.spec ESCAPE_QUOTES)\r
-\r
-OPTION(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON )\r
-OPTION(ENABLE_BUILD_DOC "Set to ON to build Documentation" OFF)\r
-\r
-MESSAGE( STATUS )\r
-MESSAGE( STATUS "-------------------------------------------------------------------------------" )\r
-MESSAGE( STATUS "BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}" )\r
-MESSAGE( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" )\r
-MESSAGE( STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}" )\r
-MESSAGE( STATUS "ENABLE_BUILD_DOC = ${ENABLE_BUILD_DOC}" )\r
-MESSAGE( STATUS "Change a value with: cmake -D<Variable>=<Value>" )\r
-MESSAGE( STATUS "-------------------------------------------------------------------------------" )\r
-MESSAGE( STATUS )\r
-\r
-SET( BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}" CACHE BOOL "Set to OFF to build static libraries" FORCE )\r
-SET( CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Where to install ${PROJECT_NAME}" FORCE )\r
-SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING\r
-"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE )\r
-#SET( ENABLE_BUILD_DOC "${ENABLE_BUILD_DOC}" CACHE BOOL "Set to ON to build Documentation" FORCE )\r
-\r
-ADD_SUBDIRECTORY( src )\r
-ADD_SUBDIRECTORY( include )\r
-ADD_SUBDIRECTORY( testscripts )\r
-\r
-IF (ENABLE_BUILD_DOC)\r
- ADD_SUBDIRECTORY( doc )\r
-\r
- ADD_CUSTOM_COMMAND(\r
- OUTPUT ${CMAKE_SOURCE_DIR}/doxygen-execute\r
- DEPENDS ${CMAKE_SOURCE_DIR}/doxygen.cfg\r
- COMMAND doxygen\r
- ARGS ${CMAKE_SOURCE_DIR}/doxygen.cfg\r
- )\r
-\r
- ADD_CUSTOM_TARGET(doxygen-doc ALL DEPENDS ${CMAKE_SOURCE_DIR}/doxygen-execute)\r
-\r
- SET( DOC_COMPONENT doc)\r
-ENDIF(ENABLE_BUILD_DOC)\r
-\r
-INSTALL(FILES automotive-dlt.pc\r
- DESTINATION lib/pkgconfig \r
- COMPONENT devel)\r
-INSTALL(FILES LICENSE.txt\r
- DESTINATION doc/dlt2 \r
- COMPONENT base)\r
-\r
-message(STATUS "python ${CMAKE_CURRENT_SOURCE_DIR}/transform_spec_file.py ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.spec.cheetah ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.spec BUILD_DOC=${ENABLE_BUILD_DOC}")\r
-\r
-add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.spec"\r
- COMMAND "python" "${CMAKE_CURRENT_SOURCE_DIR}/transform_spec_file.py" "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.spec.cheetah" "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.spec" "BUILD_DOC=${ENABLE_BUILD_DOC}"\r
- DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.spec.cheetah")\r
-\r
-add_custom_target(specfile \r
- DEPENDS "${CMAKE_PROJECT_NAME}.spec")\r
-\r
-CONFIGURE_FILE(\r
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"\r
-\r
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"\r
- IMMEDIATE @ONLY)\r
-\r
-#ADD_CUSTOM_TARGET(uninstall\r
-# "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")\r
-\r
-EXPORT_LIBRARY_DEPENDENCIES( "${PROJECT_NAME}LibDeps.cmake" )\r
-\r
-\r
-#######################\r
-# CPack configuration #\r
-#######################\r
-\r
-SET(CPACK_GENERATOR "DEB;RPM;TGZ")\r
-\r
-SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Alexander Wenzel") #required\r
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "automotive-dlt")\r
-SET(CPACK_PACKAGE_DESCRIPTION "This component provides a standardised log and trace interface, based on the\r
-standardised protocol specified in the AUTOSAR standard 4.0 DLT. \r
-This component can be used by GENIVI components and other applications as \r
-logging facility providing\r
-- the DLT shared library\r
-- the DLT daemon, including startup scripts\r
-- the DLT daemon adaptors\r
-- the DLT client console utilities\r
-- the DLT test applications ")\r
-SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")\r
-SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")\r
-SET(CPACK_PACKAGE_VERSION_MAJOR ${PRINT_MAJOR_VERSION})\r
-SET(CPACK_PACKAGE_VERSION_MINOR ${PRINT_MINOR_VERSION})\r
-SET(CPACK_PACKAGE_VERSION_PATCH ${PRINT_PATCH_LEVEL})\r
-\r
-INCLUDE(CPack)\r
+set( DLT_MAJOR_VERSION 2)\r
+set( DLT_MINOR_VERSION 9)\r
+set( DLT_PATCH_LEVEL 2)\r
+set( DLT_VERSION ${DLT_MAJOR_VERSION}.${DLT_MINOR_VERSION}.${DLT_PATCH_LEVEL})\r
+set( DLT_VERSION_STATE ALPHA )\r
+set( DLT_REVISION "")\r
+\r
+execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} \r
+ OUTPUT_VARIABLE DLT_REVISION\r
+ ERROR_VARIABLE GIT_ERROR \r
+ OUTPUT_STRIP_TRAILING_WHITESPACE\r
+ ERROR_STRIP_TRAILING_WHITESPACE)\r
+if( DLT_REVISION MATCHES "^$")\r
+ set( PRINT_REVISION "Git revision unavailable")\r
+else( DLT_REVISION MATCHES "")\r
+ string(REPLACE "-" "_" DLT_REVISION ${DLT_REVISION})\r
+ set( PRINT_REVISION ${DLT_REVISION}) \r
+endif( DLT_REVISION MATCHES "^$")\r
+\r
+# set default build type, if not defined by user\r
+if(NOT CMAKE_BUILD_TYPE)\r
+ set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING\r
+ "Choose build type: Debug, Release, RelWithDebInfo, MinSizeRel."\r
+ FORCE)\r
+ message(STATUS "Build type not defined. Using default build type 'RelWithDebInfo'.")\r
+endif(NOT CMAKE_BUILD_TYPE)\r
+\r
+# Set of indiviual options\r
+option(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON )\r
+option(WITH_SYSTEMD "Set to ON to create unit files and systemd check on dlt-daemon startup" OFF )\r
+option(WITH_SYSTEMD_WATCHDOG "Set to ON to use the systemd watchdog in dlt-daemon" OFF)\r
+option(WITH_SYSTEMD_JOURNAL "Set to ON to use the systemd journal in dlt-system" OFF)\r
+option(WITH_DOC "Set to ON to build documentation target" OFF )\r
+option(WITH_MAN "Set to ON to build man pages" ON )\r
+option(WITH_CHECK_CONFIG_FILE "Set to ON to create a configure file of CheckIncludeFiles and CheckFunctionExists " OFF )\r
+option(WITH_TESTSCRIPTS "Set to ON to run CMakeLists.txt in testscripts" OFF )\r
+option(WITH_GPROF "Set -pg to compile flags" OFF )\r
+option(WITH_DLTTEST "Set to ON to build with modifications to test User-Daemon communication with corrupt messages" OFF)\r
+option(WITH_DLT_SHM_ENABLE "EXPERIMENTAL! Set to ON to use shared memory as IPC. EXPERIMENTAL!" OFF )\r
+option(WTIH_DLT_ADAPTOR "Set ton ON to build src/adaptor binaries" ON)\r
+option(WITH_DLT_CONSOLE "Set ton ON to build src/console binaries" ON)\r
+option(WITH_DLT_EXAMPLES "Set ton ON to build src/examples binaries" ON)\r
+option(WITH_DLT_SYSTEM "Set ton ON to build src/system binaries" ON)\r
+option(WITH_DLT_TESTS "Set ton ON to build src/test binaries" ON)\r
+# RPM settings\r
+set( GENIVI_RPM_RELEASE "1")#${DLT_REVISION}")\r
+set( LICENSE "Mozilla Public License Version 2.0" )\r
+\r
+# Build, project and include settings\r
+find_package(Threads REQUIRED)\r
+\r
+include_directories( \r
+ ${CMAKE_SOURCE_DIR}/\r
+ ${CMAKE_SOURCE_DIR}/include/dlt\r
+ ${CMAKE_SOURCE_DIR}/src/shared/ \r
+ ${CMAKE_SOURCE_DIR}/src/lib/\r
+ ${CMAKE_SOURCE_DIR}/src/daemon/\r
+ ${CMAKE_SOURCE_DIR}/systemd/3rdparty/\r
+)\r
+\r
+add_definitions( -D_GNU_SOURCE )\r
+\r
+if(WITH_DLTTEST)\r
+ add_definitions( -DDLT_TEST_ENABLE)\r
+endif(WITH_DLTTEST)\r
+\r
+if(WITH_DLT_SHM_ENABLE)\r
+ add_definitions( -DDLT_SHM_ENABLE)\r
+endif(WITH_DLT_SHM_ENABLE)\r
+ \r
+if(WITH_GPROF)\r
+ SET(CMAKE_C_FLAGS "-pg")\r
+endif(WITH_GPROF) \r
+ \r
+add_definitions( "-Wall" )\r
+add_definitions( "-Wextra" )\r
+\r
+IF(${WITH_DOC} STREQUAL "OFF")\r
+ SET(PACKAGE_DOC "#")\r
+ELSE (${WITH_DOC} STREQUAL "OFF")\r
+ SET(PACKAGE_DOC "")\r
+ENDIF(${WITH_DOC} STREQUAL "OFF")\r
+\r
+configure_file(${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.spec.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.spec)\r
+configure_file(${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.pc.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc @ONLY)\r
+install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig COMPONENT devel)\r
+\r
+add_subdirectory( cmake )\r
+\r
+if(WITH_SYSTEMD OR WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD_JOURNAL)\r
+ if(WITH_SYSTEMD)\r
+ add_definitions( -DDLT_SYSTEMD_ENABLE)\r
+ endif(WITH_SYSTEMD)\r
+ \r
+ if(WITH_SYSTEMD_WATCHDOG)\r
+ add_definitions( -DDLT_SYSTEMD_WATCHDOG_ENABLE)\r
+ endif(WITH_SYSTEMD_WATCHDOG)\r
+\r
+ if(WITH_SYSTEMD_JOURNAL)\r
+ add_definitions( -DDLT_SYSTEMD_JOURNAL_ENABLE)\r
+ endif(WITH_SYSTEMD_JOURNAL)\r
+ \r
+ set( systemd_SRCS ${CMAKE_SOURCE_DIR}/systemd/3rdparty/sd-daemon.c)\r
+ \r
+ add_subdirectory( systemd )\r
+endif(WITH_SYSTEMD OR WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD_JOURNAL)\r
+\r
+add_subdirectory( doc )\r
+add_subdirectory( src )\r
+add_subdirectory( include )\r
+add_subdirectory( testscripts )\r
+\r
+message( STATUS )\r
+message( STATUS "-------------------------------------------------------------------------------" )\r
+message( STATUS "Build for Version ${DLT_VERSION} build ${DLT_REVISION} version state ${DLT_VERSION_STATE}")\r
+message( STATUS "WITH_SYSTEMD = ${WITH_SYSTEMD}" )\r
+message( STATUS "WITH_SYSTEMD_WATCHDOG = ${WITH_SYSTEMD_WATCHDOG}" )\r
+message( STATUS "WITH_SYSTEMD_JOURNAL = ${WITH_SYSTEMD_JOURNAL}" )\r
+message( STATUS "WITH_DOC = ${WITH_DOC}" )\r
+\r
+message( STATUS "WITH_MAN = ${WITH_MAN}" )\r
+message( STATUS "WTIH_DLT_ADAPTOR = ${WTIH_DLT_ADAPTOR}")\r
+message( STATUS "WITH_DLT_CONSOLE = ${WITH_DLT_CONSOLE}")\r
+message( STATUS "WITH_DLT_EXAMPLES = ${WITH_DLT_EXAMPLES}")\r
+message( STATUS "WITH_DLT_SYSTEM = ${WITH_DLT_SYSTEM}")\r
+message( STATUS "WITH_DLT_TESTS = ${WITH_DLT_TESTS}")\r
+message( STATUS "WITH_DLT_SHM_ENABLE = ${WITH_DLT_SHM_ENABLE}" )\r
+message( STATUS "WITH_DLTTEST = ${WITH_DLTTEST}" )\r
+message( STATUS "WITH_CHECK_CONFIG_FILE = ${WITH_CHECK_CONFIG_FILE}" )\r
+message( STATUS "WITH_TESTSCRIPTS = ${WITH_TESTSCRIPTS}" )\r
+message( STATUS "WITH_GPROF = ${WITH_GPROF}" )\r
+message( STATUS "BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}" )\r
+message( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" )\r
+message( STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}" )\r
+message( STATUS "Change a value with: cmake -D<Variable>=<Value>" )\r
+message( STATUS "-------------------------------------------------------------------------------" )\r
+message( STATUS )\r