2015-05-13 12:15:59 +00:00
# ------------------- Debianization ---------------------
if ( UNIX )
# Set build environment
SET ( CPACK_GENERATOR "TGZ;DEB" )
SET ( CPACK_SOURCE_TGZ "ON" )
# Common package information
SET ( CPACK_PACKAGE_DESCRIPTION_SUMMARY
" F l a t B u f f e r s i s a n e f f i c i e n t c r o s s p l a t f o r m s e r i a l i z a t i o n l i b r a r y f o r C + + , w i t h s u p p o r t f o r J a v a , C # and Go. It was created at Google specifically for game development and other performance-critical applications.")
SET ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/google/flatbuffers" )
SET ( CPACK_DEBIAN_PACKAGE_MAINTAINER "Vitaly Isaev <vitalyisaev2@gmail.com>" )
SET ( CPACK_PACKAGE_VERSION_MAJOR ${ VERSION_MAJOR } )
SET ( CPACK_PACKAGE_VERSION_MINOR ${ VERSION_MINOR } )
SET ( CPACK_PACKAGE_VERSION_PATCH ${ VERSION_PATCH } )
SET ( CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_COMMIT}" )
SET ( CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}" )
# Derive architecture
IF ( NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE )
FIND_PROGRAM ( DPKG_CMD dpkg )
IF ( NOT DPKG_CMD )
MESSAGE ( STATUS "Can not find dpkg in your path, default to i386." )
SET ( CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386 )
ENDIF ( NOT DPKG_CMD )
EXECUTE_PROCESS ( COMMAND "${DPKG_CMD}" --print-architecture
O U T P U T _ V A R I A B L E C P A C K _ D E B I A N _ P A C K A G E _ A R C H I T E C T U R E
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E
)
ENDIF ( NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE )
# Package name
SET ( CPACK_DEBIAN_PACKAGE_NAME "flatbuffers" )
SET ( CPACK_RESOURCE_FILE_LICENSE ${ CMAKE_SOURCE_DIR } /LICENSE.txt )
2018-02-15 21:39:15 +00:00
SET ( CPACK_PACKAGE_FILE_NAME
2015-05-13 12:15:59 +00:00
" $ { C P A C K _ D E B I A N _ P A C K A G E _ N A M E } _ $ { C P A C K _ D E B I A N _ P A C K A G E _ V E R S I O N } _ $ { C P A C K _ D E B I A N _ P A C K A G E _ A R C H I T E C T U R E } " )
endif ( UNIX )