blob: 0941a8074bc165058b1582658025210ceb07b98c [file] [log] [blame]
Pascal Bachd5f87e12014-12-12 15:59:17 +01001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
20
21#TODO: Should we bundle system libraries for DLLs?
22#include(InstallRequiredSystemLibraries)
23
24# For help take a look at:
25# http://www.cmake.org/Wiki/CMake:CPackConfiguration
26
27### general settings
28set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
29set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION}")
30set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Thrift")
31set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
32set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
33set(CPACK_PACKAGE_VENDOR "Apache Software Foundation")
34set(CPACK_PACKAGE_CONTACT "dev@thrift.apache.org")
35set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
36set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
37
38### versions
39set(CPACK_PACKAGE_VERSION_MAJOR ${thrift_VERSION_MAJOR})
40set(CPACK_PACKAGE_VERSION_MINOR ${thrift_VERSION_MINOR})
41set(CPACK_PACKAGE_VERSION_PATCH ${thrift_VERSION_PATCH})
42
43### source generator
44set(CPACK_SOURCE_GENERATOR "TGZ")
45set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;tags;cscope.*")
46set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
47
48### zip generator
49set(CPACK_GENERATOR "ZIP")
50set(CPACK_PACKAGE_INSTALL_DIRECTORY "thrift")
51
52
53if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
54 set(CPACK_GENERATOR "NSIS")
55 set(CPACK_NSIS_HELP_LINK "http://thrift.apache.org")
56 set(CPACK_NSIS_MENU_LINKS
57 "http://thrift.apache.org" "Apache Thrift - Web Site"
58 "https://issues.apache.org/jira/browse/THRIFT" "Apache Thrift - Issues")
59 set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
60 set(CPACK_NSIS_MODIFY_PATH "ON")
61 set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
62else()
63 set(CPACK_GENERATOR "DEB" )
64 set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
65endif()
66
67
68include(CPack)