Back to home page

Enduro/X

 
 

    


0001 ## 
0002 ## Enduro Execution platform main Make descriptor
0003 ##
0004 ## @file CMakeLists.txt
0005 ## 
0006 ## -----------------------------------------------------------------------------
0007 ## Enduro/X Middleware Platform for Distributed Transaction Processing
0008 ## Copyright (C) 2015, Mavimax, Ltd. All Rights Reserved.
0009 ## This software is released under one of the following licenses:
0010 ## GPL or Mavimax's license for commercial use.
0011 ## -----------------------------------------------------------------------------
0012 ## GPL license:
0013 ## 
0014 ## This program is free software; you can redistribute it and/or modify it under
0015 ## the terms of the GNU General Public License as published by the Free Software
0016 ## Foundation; either version 2 of the License, or (at your option) any later
0017 ## version.
0018 ##
0019 ## This program is distributed in the hope that it will be useful, but WITHOUT ANY
0020 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0021 ## PARTICULAR PURPOSE. See the GNU General Public License for more details.
0022 ##
0023 ## You should have received a copy of the GNU General Public License along with
0024 ## this program; if not, write to the Free Software Foundation, Inc., 59 Temple
0025 ## Place, Suite 330, Boston, MA 02111-1307 USA
0026 ##
0027 ## -----------------------------------------------------------------------------
0028 ## A commercial use license is available from Mavimax, Ltd
0029 ## contact@mavimax.com
0030 ## -----------------------------------------------------------------------------
0031 ##
0032 
0033 cmake_minimum_required (VERSION 2.6) 
0034 project (ENDUROX) 
0035 set(VERSION "5.2.6")
0036 set(PROJ_NAME "Enduro/X")
0037 set(RELEASE "1")
0038 
0039 
0040 ################################################################################
0041 # OS Confiugration
0042 ################################################################################
0043 
0044 EXEC_PROGRAM(uname ARGS -a OUTPUT_VARIABLE _TMP_CMAKE_OS_NAME)
0045 string(REGEX MATCH "^[a-zA-Z0-9-]*" _TMP_CMAKE_OS_NAME_EXTR ${_TMP_CMAKE_OS_NAME})
0046 string(TOUPPER ${_TMP_CMAKE_OS_NAME_EXTR} CMAKE_OS_NAME)
0047 
0048 message("CMake CMAKE_OS_NAME  = ${CMAKE_OS_NAME}")
0049 message("CMake CMAKE_C_COMPILER_ID  = ${CMAKE_C_COMPILER_ID}")
0050 message("CMake CMAKE_CXX_COMPILER_ID  = ${CMAKE_CXX_COMPILER_ID}")
0051 
0052 OPTION(DEFINE_FORCEPOLL "Force POLL (even on linux)" OFF)
0053 OPTION(DEFINE_FORCEFDPOLL "Force FDPOLL" OFF)
0054 OPTION(DEFINE_FORCEKQUEUE "Force Kqueue (BSD poll framework)" OFF)
0055 
0056 OPTION(DEFINE_RELEASEBUILD "Do relesae build" OFF)
0057 OPTION(DEFINE_FORCEEMQ "Force Emulated Message Queue" OFF)
0058 
0059 
0060 SET ( CMAKE_CXX_FLAGS "-O2 -fno-exceptions -fno-rtti" CACHE STRING "compile flags" FORCE)
0061 
0062 # Enable release only if specified.
0063 # By default if RELEASE_BUILD is not defined, then we run in debug!
0064 IF (DEFINE_RELEASEBUILD)
0065         MESSAGE( RELEASE_BUILD )
0066         SET(CMAKE_BUILD_TYPE release)
0067         SET(CMAKE_C_FLAGS "-fstack-protector -O2 ${CMAKE_C_FLAGS}")
0068 ELSE ()
0069         MESSAGE( DEBUG_BUILD )
0070         SET(CMAKE_BUILD_TYPE debug)
0071 # Memory debugging:
0072 #       SET(CMAKE_C_FLAGS "-fsanitize=alignment -fsanitize=address -fno-omit-frame-pointer -O1 -ggdb ${CMAKE_C_FLAGS}")
0073         SET(CMAKE_C_FLAGS "-fstack-protector -O2 -ggdb ${CMAKE_C_FLAGS}")
0074 ENDIF ()
0075 
0076 SET(RT_LIB rt dl)
0077 if( ${CMAKE_OS_NAME} STREQUAL "LINUX" )
0078         set(EX_OS_LINUX "1")
0079         set(NDRX_LD_LIBRARY_PATH "LD_LIBRARY_PATH")
0080         # Enable poll only
0081         IF(DEFINE_FORCEPOLL)
0082             message("Linux - Using poll()")
0083             set(EX_USE_POLL "1")
0084         ELSEIF(DEFINE_FORCEFDPOLL)
0085             message("Linux - Using fdpoll()")
0086         ELSE()
0087             message("Linux - Using epoll()")
0088             set(EX_USE_EPOLL "1")
0089         ENDIF()
0090 elseif(${CMAKE_OS_NAME} STREQUAL "AIX")
0091 # Configure the compiler, we support XLC too..
0092 
0093         message("No threads mode for CPM - bit slower child process exit status check...")
0094         # Seems aix 7.1 does not like threads mixed with fork...
0095         set(EX_CPM_NO_THREADS "1")
0096         set(NDRX_LD_LIBRARY_PATH "LD_LIBRARY_PATH")
0097 
0098         if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
0099                 message("GNU compiler")
0100                 set ( CMAKE_C_FLAGS "-D_THREAD_SAFE -pthread -maix64 ${CMAKE_C_FLAGS}")
0101         elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "XL")
0102                 message("XL compiler")
0103                 set ( CMAKE_C_FLAGS " -D_THREAD_SAFE -qpic -bexpfull -b64 -brtl -qtls -q64 -qlanglvl=extc99 -qsuppress=1506-997 -qprocimported=setjmp -lbsd")
0104 
0105                 if (NOT DEFINE_RELEASEBUILD)
0106                         message("XL compiler: with -g (debug symbols...)")
0107                         set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
0108                 endif()
0109         endif()
0110 
0111     set(EX_USE_POLL "1")
0112         set(EX_OS_AIX "1")
0113     # For AIX we do not have other options that use file system
0114     # base queue registry.
0115     set(USE_FS_REGISTRY "1")
0116 elseif(${CMAKE_OS_NAME} STREQUAL "HP-UX")
0117     set(EX_USE_POLL "1")
0118         set(EX_OS_HPUX "1")
0119     set(NDRX_LD_LIBRARY_PATH "SHLIB_PATH")
0120 elseif(${CMAKE_OS_NAME} STREQUAL "SUNOS")
0121         set(EX_OS_SUNOS "1")
0122     set(EX_USE_POLL "1")
0123     set(NDRX_LD_LIBRARY_PATH "LD_LIBRARY_PATH")
0124         # Bug #219 !!! _REENTRANT makes errno thread safe
0125         SET(CMAKE_C_FLAGS "-D_REENTRANT")
0126         if ("${CMAKE_C_COMPILER_ID}" STREQUAL "SunPro")
0127                 message("SUN Studio compiler (building for 64bit) ")
0128 
0129                 # Bug #219 !!! _REENTRANT makes errno thread safe
0130                 # For GNU I guess 
0131                 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -errtags -fast -m64 -xc99=all -erroff=E_PTR_TO_VOID_IN_ARITHMETIC ")
0132                 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=E_EMPTY_MBR_DECLARATION -erroff=E_NO_IMPLICIT_DECL_ALLOWED")
0133                 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=E_EMPTY_DECLARATION -erroff=E_ARGUEMENT_MISMATCH -erroff=E_ZERO_OR_NEGATIVE_SUBSCRIPT")
0134                 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=E_ARG_INCOMPATIBLE_WITH_ARG_L")
0135                 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=E_BAD_PTR_INT_COMBINATION")
0136 
0137                 SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -m64")
0138                 # Add Sun Studio C runtime
0139                 SET(RT_LIB ${RT_LIB} Crun)
0140         endif()
0141 elseif(${CMAKE_OS_NAME} STREQUAL "FREEBSD")
0142     SET(RT_LIB rt)
0143         # seem that threading model also does not work here...
0144     set(EX_CPM_NO_THREADS "1")
0145         set(EX_OS_FREEBSD "1")
0146         # Best option...
0147     set(EX_USE_KQUEUE "1")
0148     set(NDRX_LD_LIBRARY_PATH "LD_LIBRARY_PATH")
0149 elseif(${CMAKE_OS_NAME} STREQUAL "CYGWIN")
0150         set(EX_OS_CYGWIN "1")
0151     set(EX_USE_POLL "1")
0152     set(NDRX_LD_LIBRARY_PATH "LD_LIBRARY_PATH")
0153 elseif(${CMAKE_OS_NAME} STREQUAL "DARWIN")
0154     SET(RT_LIB dl)
0155     set(EX_OS_DARWIN "1")
0156     set(EX_USE_EMQ "1")
0157     set(EX_USE_POLL "1")
0158     set(NDRX_LD_LIBRARY_PATH "DYLD_FALLBACK_LIBRARY_PATH")
0159 # Unknown OS:
0160 else()
0161         message( FATAL_ERROR "Unsupported OS" )
0162 endif()
0163 
0164 # Use emulated message queue
0165 IF(DEFINE_FORCEEMQ)
0166     message("Using emulated message queue")
0167     set(EX_USE_EMQ "1")
0168     set(EX_USE_POLL "1")
0169 ENDIF()
0170 
0171 # Use emulated message queue
0172 IF(DEFINE_FORCEFDPOLL)
0173     message("Using poll on MQ mqd_t as file descriptor")
0174     set(EX_USE_FDPOLL "1")
0175 ENDIF()
0176 
0177 IF(DEFINE_FORCEKQUEUE)
0178     message("Using Kqueue event mechanism")
0179     set(EX_USE_KQUEUE "1")
0180 ENDIF()
0181 
0182 ################################################################################
0183 # "Configure"
0184 ################################################################################
0185 
0186 # In this file we are doing all of our 'configure' checks. Things like checking
0187 # for headers, functions, libraries, types and size of types.
0188 INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
0189 INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
0190 INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
0191 INCLUDE (${CMAKE_ROOT}/Modules/CheckCSourceCompiles.cmake)
0192 INCLUDE (${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake)
0193 INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
0194 INCLUDE (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
0195 
0196 
0197 CHECK_C_SOURCE_COMPILES("extern const char * __progname; int main() {return __progname[0];}" HAVE_PROGNAME)
0198 
0199 CHECK_C_SOURCE_COMPILES("int main() {__builtin_expect(1, 1);}" HAVE_EXPECT)
0200 
0201 CHECK_C_SOURCE_COMPILES("int main() { int X = 0; __sync_bool_compare_and_swap(&X, 0, 1); __sync_synchronize();}" HAVE_SYNC)
0202 
0203 CHECK_C_SOURCE_COMPILES("#include <stdio.h> \n int main() {char buf[128]; size_t len; getline(buf, &len, stdin);}" HAVE_GETLINE)
0204 
0205 CHECK_C_SOURCE_COMPILES("#include <string.h> \n int main() {char dest[1]; char src[1]; strlcpy(dest, src, 1);}" HAVE_STRLCPY)
0206 
0207 CHECK_C_SOURCE_COMPILES("#include <string.h> \n int main() {strnlen(\"ABC\", 1);}" HAVE_STRNLEN)
0208 
0209 # To check for an include file you do this: 
0210 CHECK_INCLUDE_FILE("stdint.h"        HAVE_STDINT_H)
0211 CHECK_INCLUDE_FILE("getopt.h"       HAVE_GETOPT_H)
0212         
0213 
0214 # To check the size of a primitive type:
0215 CHECK_TYPE_SIZE("int"   SIZEOF_INT)
0216 
0217 IF (DEFINE_DISABLEPSCRIPT)
0218         set(NDRX_DISABLEPSCRIPT "1")
0219 ENDIF()
0220 
0221 # Output the project version
0222 set(NDRX_VERSION_STR "${PROJ_NAME} ${VERSION}")
0223 
0224 ################################################################################
0225 # Install dir config
0226 ################################################################################
0227 get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
0228 
0229 message("LIB: ${LIB64}")
0230 
0231 if(${CMAKE_OS_NAME} STREQUAL "DARWIN")
0232     set(LIB_SUFFIX "")
0233 # Seems like BSD does not use lib64 folder
0234 elseif ("${CMAKE_OS_NAME}" STREQUAL "FREEBSD")
0235     set(LIB_SUFFIX "")
0236 elseif ("${LIB64}" STREQUAL "TRUE")
0237     set(LIB_SUFFIX 64)
0238 else()
0239     set(LIB_SUFFIX "")
0240 endif()
0241 
0242 message("LIB_SUFFIX: ${LIB_SUFFIX}")
0243 
0244 set(INSTALL_LIB_DIR lib${LIB_SUFFIX} CACHE PATH "Installation directory for libraries")
0245 
0246 message("INSTALL_LIB_DIR: ${INSTALL_LIB_DIR}")
0247 
0248 mark_as_advanced(INSTALL_LIB_DIR) 
0249 MESSAGE( STATUS "INSTALL_LIB_DIR: " ${INSTALL_LIB_DIR} )
0250 
0251 ################################################################################
0252 # Options
0253 ################################################################################
0254 
0255 # Option to disable gpg-me (gpg-me enabled by default)
0256 
0257 OPTION(DEFINE_DISABLEGPGME "Use GPG-ME encryption" OFF)
0258  
0259 IF(DEFINE_DISABLEGPGME)
0260     ADD_DEFINITIONS(-DDISABLEGPGME)
0261 ENDIF(DEFINE_DISABLEGPGME)
0262 
0263 OPTION(DEFINE_DISABLEPSCRIPT "Disable Platform Script" OFF)
0264 ###############################################################################
0265 
0266 ################################################################################
0267 # Option to disable documentation build (dos are enabled by default)
0268 OPTION(DEFINE_DISABLEDOC "Disable documentation generation" OFF) 
0269 ################################################################################
0270 
0271 ################################################################################
0272 # Submakes
0273 ################################################################################
0274 # Recurse into the project subdirectories. This does not actually
0275 # cause another cmake executable to run. The same process will walk through 
0276 # the project's entire directory structure. 
0277 add_subdirectory (libnstd)
0278 add_subdirectory (embedfile)
0279 add_subdirectory (libcgreen)
0280 add_subdirectory (libexuuid)
0281 add_subdirectory (libubf)
0282 add_subdirectory (libnetproto)
0283 add_subdirectory (libthpool)
0284 add_subdirectory (ubftest)
0285 add_subdirectory (mkfldhdr)
0286 # EnduroX sub-directories for ATMI
0287 add_subdirectory (libatmi) # General Purpose ATMI library
0288 add_subdirectory (libatmisrv) #  ATMI server library 
0289 add_subdirectory (libatmiclt) #  ATMI client library 
0290 add_subdirectory (libexnet)
0291 add_subdirectory (libexmemck)
0292 
0293 IF (NOT DEFINE_DISABLEPSCRIPT)
0294         add_subdirectory (libps) # Platform script
0295         add_subdirectory (libpsstdlib) # Platform script standard library
0296 ENDIF()
0297 
0298 add_subdirectory (tpevsrv)
0299 add_subdirectory (tprecover) # Special recovery server
0300 add_subdirectory (tpbrdcstsv) # tpbroadcast remote machine dispatcher
0301 add_subdirectory (ud)
0302 
0303 
0304 IF (NOT DEFINE_DISABLEPSCRIPT)
0305         add_subdirectory (pscript) # Platform script interpreter
0306 ENDIF()
0307 
0308 add_subdirectory (viewc) # View compiler
0309 add_subdirectory (ndrxd) # Enduro X daemon
0310 add_subdirectory (xadmin) # Enduro X command line interface
0311 add_subdirectory (xmemck) # Enduro X memcory checking tool
0312 add_subdirectory (bridge) # Cluster bridge server
0313 add_subdirectory (tmsrv) # Transaction Manager server for XA transactions
0314 add_subdirectory (tmqueue) # Persistant Queue server
0315 add_subdirectory (cpmsrv) # Client Process Monitor
0316 add_subdirectory (xadrv) # XA Drivers for RMs
0317 add_subdirectory (cconfsrv) # Common-Config server
0318 add_subdirectory (plugins) # XA Drivers for RMs
0319 add_subdirectory (enctools) # XA Drivers for RMs
0320 add_subdirectory (atmitest) #  ATMI testing
0321 
0322 IF(DEFINE_DISABLEDOC)
0323         message("Documentation disabled - not building")
0324 ELSE (DEFINE_DISABLEDOC)
0325         add_subdirectory (doc) #  Documentation project.
0326 ENDIF (DEFINE_DISABLEDOC)
0327 
0328 add_subdirectory (include) #  For install
0329 add_subdirectory (scripts) #  For install
0330 add_subdirectory (sampleconfig) #  For install
0331 
0332 
0333 ################################################################################
0334 # uninstall target
0335 ################################################################################
0336 configure_file(
0337     "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
0338     "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
0339     IMMEDIATE @ONLY)
0340 
0341 add_custom_target(uninstall
0342     COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
0343 ################################################################################
0344 # Packages
0345 ################################################################################
0346 
0347 find_program(LSB_RELEASE_EXECUTABLE lsb_release)
0348 if(LSB_RELEASE_EXECUTABLE)
0349         execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -si
0350                 OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT_OS
0351                 ERROR_QUIET
0352                 OUTPUT_STRIP_TRAILING_WHITESPACE)
0353 
0354         string(TOLOWER 
0355                 ${_TMP_LSB_RELEASE_OUTPUT_OS}
0356         LSB_RELEASE_OUTPUT_OS)
0357         string(REPLACE " " "_" LSB_RELEASE_OUTPUT_OS ${LSB_RELEASE_OUTPUT_OS})
0358 
0359         execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -sr
0360                 OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT_VER
0361                 ERROR_QUIET
0362                 OUTPUT_STRIP_TRAILING_WHITESPACE)
0363         string(REPLACE "." "_" LSB_RELEASE_OUTPUT_VER ${_TMP_LSB_RELEASE_OUTPUT_VER})
0364         #string(REGEX MATCH "^[0-9]+" LSB_RELEASE_OUTPUT_VER ${_TMP_LSB_RELEASE_OUTPUT_VER})
0365 else ()
0366         set(LSB_RELEASE_OUTPUT_OS ${CMAKE_OS_NAME})
0367 
0368         string(REPLACE "." "_" _TMP_LSB_RELEASE_OUTPUT_VER ${CMAKE_SYSTEM_VERSION})
0369         string(REPLACE "-" "_" LSB_RELEASE_OUTPUT_VER ${_TMP_LSB_RELEASE_OUTPUT_VER})
0370         
0371         # If it is AIX, then we can extract version from uname
0372         if(${CMAKE_OS_NAME} STREQUAL "AIX")
0373                 execute_process(COMMAND uname -v
0374                         OUTPUT_VARIABLE _TMP_OS_MAJOR_VER OUTPUT_STRIP_TRAILING_WHITESPACE)
0375                 execute_process(COMMAND uname -r
0376                         OUTPUT_VARIABLE _TMP_OS_MINOR_VER OUTPUT_STRIP_TRAILING_WHITESPACE)
0377                 set(LSB_RELEASE_OUTPUT_VER ${_TMP_OS_MAJOR_VER}_${_TMP_OS_MINOR_VER})
0378         endif()
0379         
0380 endif()
0381 
0382 message("LSB_RELEASE OS  = ${LSB_RELEASE_OUTPUT_OS}")
0383 message("LSB_RELEASE VER = ${LSB_RELEASE_OUTPUT_VER}")
0384 set(EX_LSB_RELEASE_VER ${LSB_RELEASE_OUTPUT_VER})
0385 
0386 string(REPLACE "_" ";" LSB_VERSION_LIST ${LSB_RELEASE_OUTPUT_VER})
0387 
0388 list( LENGTH LSB_VERSION_LIST TMP_LIST_LEN ) 
0389 
0390 if (TMP_LIST_LEN LESS 1)
0391         # No version at all!!
0392         set(EX_LSB_RELEASE_VER_MAJOR "0")
0393         set(EX_LSB_RELEASE_VER_MINOR "0")
0394 elseif (TMP_LIST_LEN LESS 2)
0395         # Bug #198 - FedoraCore do not have minor version numbers
0396         list(GET LSB_VERSION_LIST 0 EX_LSB_RELEASE_VER_MAJOR)
0397         set(EX_LSB_RELEASE_VER_MINOR "0")
0398 
0399 else ()
0400         list(GET LSB_VERSION_LIST 0 EX_LSB_RELEASE_VER_MAJOR)
0401         list(GET LSB_VERSION_LIST 1 EX_LSB_RELEASE_VER_MINOR)
0402 endif()
0403 
0404 MESSAGE( "EX_LSB_RELEASE_VER_MAJOR = " ${EX_LSB_RELEASE_VER_MAJOR} )
0405 MESSAGE( "EX_LSB_RELEASE_VER_MINOR = " ${EX_LSB_RELEASE_VER_MINOR} )
0406 
0407 # Support only for Linux
0408 MESSAGE( "CPack:Debug: CMAKE_SYSTEM_NAME = " ${CMAKE_SYSTEM_NAME} )
0409 MESSAGE( "CPack:Debug: CMAKE_SYSTEM_PROCESSOR = " ${CMAKE_SYSTEM_PROCESSOR} )
0410 set(CPACK_MONOLITHIC_INSTALL 1)
0411 
0412 #
0413 # Generate configuration 
0414 #
0415 configure_file ("${PROJECT_SOURCE_DIR}/include/ndrx_config.h.in"
0416                 "${PROJECT_BINARY_DIR}/include/ndrx_config.h" )
0417 
0418 # Test the available generators and then configure output
0419 find_program(RPMPROG "rpmbuild")
0420 find_program(APTPROG "dpkg")
0421 
0422 # avoid file /usr/share/man from install of endurox-3.5.1-1.x86_64 conflicts with file from package filesystem-3.2-21.el7.x86_64
0423 # problems...
0424 set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /usr/share/man
0425                 /usr/share/man/man3
0426                 /usr/share/man/man5
0427                 /usr/share/man/man8
0428                 /usr/lib64/pkgconfig
0429                 /usr/lib/pkgconfig)
0430 message("Excl: ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION}")
0431 
0432 set(CPACK_GENERATOR "TGZ")
0433 if(RPMPROG)
0434         message("Outputting RPM")
0435         set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
0436 endif()
0437 
0438 if(APTPROG)
0439         message("Outputting DEB")
0440         set(CPACK_GENERATOR "${CPACK_GENERATOR};DEB")
0441 endif()
0442 
0443 set(CPACK_PACKAGE_CONTACT "madars.vitolins@gmail.com")
0444 set(CPACK_PACKAGE_VERSION ${VERSION})
0445 #set(CPACK_DEBIAN_PACKAGE_DEPENDS "libxml2,openssl,libgpgme11")
0446 #set(CPACK_RPM_PACKAGE_REQUIRES "libxml2,openssl,libssl,libgpgme11")
0447 string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LO)
0448 message("CPack:Debug: PROJECT NAME = ${PROJECT_NAME_LO}")
0449 set(CPACK_PACKAGE_FILE_NAME         ${PROJECT_NAME_LO}-${VERSION}-${RELEASE}.${LSB_RELEASE_OUTPUT_OS}${LSB_RELEASE_OUTPUT_VER}_${CMAKE_C_COMPILER_ID}.${CMAKE_SYSTEM_PROCESSOR})
0450 message("CPack:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
0451 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Enduro/X Middleware Platform")
0452 set(CPACK_DEBIAN_PACKAGE_DESCRIPTION  ${CPACK_PACKAGE_DESCRIPTION})
0453 set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
0454 #set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/Debian/postinst")
0455 
0456 include(CPack)
0457 ################################################################################
0458 
0459 
0460