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