Pascal Bach | d5f87e1 | 2014-12-12 15:59:17 +0100 | [diff] [blame] | 1 | # |
| 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 |
| 28 | set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") |
| 29 | set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION}") |
| 30 | set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Thrift") |
| 31 | set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") |
| 32 | set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") |
| 33 | set(CPACK_PACKAGE_VENDOR "Apache Software Foundation") |
| 34 | set(CPACK_PACKAGE_CONTACT "dev@thrift.apache.org") |
| 35 | set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") |
| 36 | set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}") |
| 37 | |
| 38 | ### versions |
| 39 | set(CPACK_PACKAGE_VERSION_MAJOR ${thrift_VERSION_MAJOR}) |
| 40 | set(CPACK_PACKAGE_VERSION_MINOR ${thrift_VERSION_MINOR}) |
| 41 | set(CPACK_PACKAGE_VERSION_PATCH ${thrift_VERSION_PATCH}) |
| 42 | |
| 43 | ### source generator |
| 44 | set(CPACK_SOURCE_GENERATOR "TGZ") |
| 45 | set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;tags;cscope.*") |
| 46 | set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") |
| 47 | |
| 48 | ### zip generator |
| 49 | set(CPACK_GENERATOR "ZIP") |
| 50 | set(CPACK_PACKAGE_INSTALL_DIRECTORY "thrift") |
| 51 | |
| 52 | |
| 53 | if(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}) |
| 62 | else() |
| 63 | set(CPACK_GENERATOR "DEB" ) |
| 64 | set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT}) |
| 65 | endif() |
| 66 | |
| 67 | |
| 68 | include(CPack) |