2018-12-07 06:51:35 +08:00
|
|
|
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
|
|
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
|
|
|
|
# 2015, 2016, 2017, 2018
|
|
|
|
# University Corporation for Atmospheric Research/Unidata.
|
|
|
|
|
|
|
|
# See netcdf-c/COPYRIGHT file for more info.
|
2014-12-03 04:58:23 +08:00
|
|
|
#####
|
|
|
|
# Contains variables and settings used
|
2014-12-03 05:12:31 +08:00
|
|
|
# by the CMake build system in order to
|
2014-12-03 04:58:23 +08:00
|
|
|
# build binary installers.
|
|
|
|
#####
|
|
|
|
|
2014-12-06 02:19:02 +08:00
|
|
|
SET(CPACK_PACKAGE_VENDOR "Unidata")
|
|
|
|
|
|
|
|
##
|
|
|
|
# Declare exclusions list used when building a source file.
|
|
|
|
# NOTE!! This list uses regular expressions, NOT wildcards!!
|
|
|
|
##
|
|
|
|
SET(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}"
|
|
|
|
"/expecttds3/"
|
|
|
|
"/nocacheremote3/"
|
|
|
|
"/nocacheremote4/"
|
|
|
|
"/special3/"
|
|
|
|
"${CMAKE_BINARY_DIR}/*"
|
|
|
|
"/myhtml/*"
|
|
|
|
"/.svn/"
|
|
|
|
"my.*\\\\.sh"
|
|
|
|
"/.deps/"
|
|
|
|
"/.libs"
|
|
|
|
"/html/"
|
|
|
|
".*\\\\.jar"
|
|
|
|
".*\\\\.jdl"
|
|
|
|
".*\\\\.sed"
|
|
|
|
".*\\\\.proto"
|
|
|
|
".*\\\\.texi"
|
|
|
|
".*\\\\.example"
|
|
|
|
"Make0"
|
|
|
|
"/obsolete/"
|
|
|
|
"/unknown/"
|
|
|
|
".*~"
|
2019-02-06 03:57:27 +08:00
|
|
|
".git/"
|
2014-12-06 02:19:02 +08:00
|
|
|
)
|
2014-12-03 04:58:23 +08:00
|
|
|
|
|
|
|
###
|
2014-12-03 05:12:31 +08:00
|
|
|
# Set options specific to the
|
2014-12-03 04:58:23 +08:00
|
|
|
# Nullsoft Installation System (NSIS)
|
|
|
|
###
|
|
|
|
|
2014-12-16 05:52:31 +08:00
|
|
|
SET(CPACK_PACKAGE_CONTACT "NetCDF Support <support-netcdf@unidata.ucar.edu>")
|
|
|
|
|
2014-12-03 04:58:23 +08:00
|
|
|
IF(WIN32)
|
|
|
|
SET(CPACK_NSIS_MODIFY_PATH ON)
|
2014-12-05 03:42:55 +08:00
|
|
|
SET(CPACK_NSIS_DISPLAY_NAME "NetCDF ${netCDF_VERSION}")
|
|
|
|
SET(CPACK_NSIS_PACKAGE_NAME "NetCDF ${netCDF_VERSION}")
|
2014-12-03 04:58:23 +08:00
|
|
|
SET(CPACK_NSIS_HELP_LINK "http://www.unidata.ucar.edu/netcdf")
|
2014-12-05 03:42:55 +08:00
|
|
|
SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.unidata.ucar.edu/netcdf")
|
|
|
|
SET(CPACK_NSIS_CONTACT "support-netcdf@unidata.ucar.edu")
|
2014-12-03 04:58:23 +08:00
|
|
|
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
2014-12-05 03:52:47 +08:00
|
|
|
SET(CPACK_NSIS_MENU_LINKS
|
2019-02-06 03:57:27 +08:00
|
|
|
"http://www.unidata.ucar.edu/software/netcdf" "Unidata Website"
|
|
|
|
"http://www.unidata.ucar.edu/software/netcdf/docs" "NetCDF Stable Documentation"
|
|
|
|
"http://www.unidata.ucar.edu/software/netcdf/docs_rc" "NetCDF Unstable Documentation")
|
2014-12-05 03:52:47 +08:00
|
|
|
|
2014-12-03 04:58:23 +08:00
|
|
|
ENDIF()
|
|
|
|
|
2014-12-16 05:52:31 +08:00
|
|
|
###
|
|
|
|
# Set debian-specific options used when
|
|
|
|
# creating .deb.
|
|
|
|
#
|
|
|
|
# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators
|
|
|
|
###
|
|
|
|
|
|
|
|
# This should be set using the output of dpkg --print-architecture.
|
|
|
|
FIND_PROGRAM(NC_DPKG NAMES dpkg)
|
|
|
|
IF(NC_DPKG)
|
|
|
|
# Define a macro for getting the dpkg architecture.
|
|
|
|
MACRO(getdpkg_arch arch)
|
|
|
|
exec_program("${NC_DPKG}" ARGS "--print-architecture" OUTPUT_VARIABLE "${arch}")
|
|
|
|
ENDMACRO(getdpkg_arch)
|
|
|
|
getdpkg_arch(dpkg_arch)
|
|
|
|
|
2018-12-07 06:51:35 +08:00
|
|
|
SET(CPACK_DEBIAN_PACKAGE_NAME "netcdf4-dev")
|
2014-12-16 05:52:31 +08:00
|
|
|
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${dpkg_arch}")
|
2014-12-16 06:22:09 +08:00
|
|
|
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g (>= 1:1.2.3.4), libhdf5-7 (>= 1.8.11), libcurl4-openssl-dev (>= 7.22.0)")
|
2014-12-16 05:52:31 +08:00
|
|
|
ENDIF()
|
|
|
|
|
2014-12-06 02:19:02 +08:00
|
|
|
|
|
|
|
##
|
|
|
|
# Set Copyright, License info for CPack.
|
|
|
|
##
|
|
|
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/COPYRIGHT.txt
|
|
|
|
@ONLY
|
|
|
|
)
|
|
|
|
|
|
|
|
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYRIGHT.txt")
|
|
|
|
IF(NOT CPACK_PACK_VERSION)
|
|
|
|
SET(CPACK_PACKAGE_VERSION ${VERSION})
|
|
|
|
ENDIF()
|
|
|
|
|
2014-12-16 05:52:31 +08:00
|
|
|
IF(UNIX)
|
|
|
|
SET(CPACK_GENERATOR "STGZ" "TBZ2" "DEB" "ZIP")
|
|
|
|
ENDIF()
|
|
|
|
|
2014-12-06 02:19:02 +08:00
|
|
|
IF(APPLE)
|
|
|
|
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
2019-02-06 04:08:30 +08:00
|
|
|
SET(CPACK_GENERATOR "productbuild" "STGZ" "TBZ2" "TGZ" "ZIP")
|
2014-12-06 02:19:02 +08:00
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
##
|
|
|
|
# Create an 'uninstall' target.
|
|
|
|
##
|
|
|
|
CONFIGURE_FILE(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
|
|
|
|
ADD_CUSTOM_TARGET(uninstall
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
|
|
|
|
|
|
|
##
|
|
|
|
# Customize some of the package component descriptions
|
|
|
|
##
|
|
|
|
|
|
|
|
set(CPACK_COMPONENT_UTILITIES_DESCRIPTION
|
|
|
|
"The NetCDF-C Utilities")
|
|
|
|
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
|
|
|
|
"The NetCDF-C Libraries")
|
|
|
|
set(CPACK_COMPONENT_HEADERS_DESCRIPTION
|
|
|
|
"Header files for use with NetCDF-C")
|
|
|
|
set(CPACK_COMPONENT_DEPENDENCIES_DESCRIPTION
|
|
|
|
"Dependencies for this build of NetCDF-C")
|
|
|
|
set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
|
|
|
|
"The NetCDF-C user documentation.")
|
|
|
|
|
2018-12-07 06:51:35 +08:00
|
|
|
INCLUDE(CPack)
|