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