You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
srsRAN_4G/cmake/modules/SRSRANPackage.cmake

84 lines
2.9 KiB
CMake

#
# Copyright 2013-2022 Software Radio Systems Limited
#
# This file is part of srsRAN
#
# srsRAN is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsRAN 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 Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
SET(CPACK_PACKAGE_DESCRIPTION "srsRAN")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LTE library for SDR.")
SET(CPACK_PACKAGE_NAME "srsran")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libboost-dev (>= 1.35)")
SET(CPACK_PACKAGE_CONTACT "Ismael Gomez ")
SET(CPACK_PACKAGE_VENDOR "Software Radio Systems Limited")
SET(CPACK_PACKAGE_VERSION_MAJOR ${SRSRAN_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${SRSRAN_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${SRSRAN_VERSION_PATCH})
SET(VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
########################################################################
# Setup additional defines for OS types
########################################################################
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET(LINUX TRUE)
ENDIF()
IF(LINUX AND EXISTS "/etc/debian_version")
SET(DEBIAN TRUE)
ENDIF()
IF(LINUX AND EXISTS "/etc/redhat-release")
SET(REDHAT TRUE)
ENDIF()
########################################################################
# Set generator type for recognized systems
########################################################################
IF(CPACK_GENERATOR)
#already set
ELSEIF(APPLE)
SET(CPACK_GENERATOR PackageMaker)
ELSEIF(WIN32)
SET(CPACK_GENERATOR NSIS)
ELSEIF(DEBIAN)
SET(CPACK_GENERATOR DEB)
ELSEIF(REDHAT)
SET(CPACK_GENERATOR RPM)
ELSE()
SET(CPACK_GENERATOR TGZ)
ENDIF()
########################################################################
# Setup CPack Debian
########################################################################
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-dev")
########################################################################
# Setup CPack RPM
########################################################################
SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel")
########################################################################
# Setup CPack NSIS
########################################################################
SET(CPACK_NSIS_MODIFY_PATH ON)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}-${CMAKE_SYSTEM_PROCESSOR}")
INCLUDE(CPack)