summaryrefslogtreecommitdiff
path: root/compiler/cpp/CMakeLists.txt
diff options
context:
space:
mode:
authorRoger Meier <roger@apache.org>2014-08-15 22:16:02 +0200
committerRoger Meier <roger@apache.org>2014-08-15 23:07:12 +0200
commit8720260e39c730be6803a17192b533e3fe6bcbf8 (patch)
tree09d908dc2c1dee82c4d4d3b5c1e353eb5d632b36 /compiler/cpp/CMakeLists.txt
parentdace6937a7c1f53c45c005f0d5d6e2851b656da6 (diff)
downloadthrift-8720260e39c730be6803a17192b533e3fe6bcbf8.tar.gz
THRIFT-2667 create Windows Installer via CPack
Signed-off-by: Roger Meier <roger@apache.org>
Diffstat (limited to 'compiler/cpp/CMakeLists.txt')
-rw-r--r--compiler/cpp/CMakeLists.txt28
1 files changed, 26 insertions, 2 deletions
diff --git a/compiler/cpp/CMakeLists.txt b/compiler/cpp/CMakeLists.txt
index 152e5db45..43c37cc41 100644
--- a/compiler/cpp/CMakeLists.txt
+++ b/compiler/cpp/CMakeLists.txt
@@ -147,6 +147,30 @@ add_executable(thrift ${thrift_SOURCES})
target_link_libraries(thrift libparse)
-if(NOT WIN32)
- install(TARGETS thrift DESTINATION bin)
+install(TARGETS thrift DESTINATION bin)
+
+# create a Distribution Package for the Apache Thrift Compiler
+set(CPACK_PACKAGE_NAME "Apache Thrift")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Thrift Compiler")
+set(CPACK_PACKAGE_VENDOR "Apache Software Foundation" )
+set(CPACK_PACKAGE_CONTACT "dev@thrift.apache.org")
+set(CPACK_PACKAGE_VERSION ${thrift_VERSION})
+set(CPACK_PACKAGE_VERSION_MAJOR ${thrift_VERSION_MAJOR} )
+set(CPACK_PACKAGE_VERSION_MINOR ${thrift_VERSION_MINOR} )
+set(CPACK_PACKAGE_VERSION_PATCH ${thrift_VERSION_PATCH} )
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../../LICENSE")
+
+if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ set(CPACK_GENERATOR "NSIS")
+ set(CPACK_NSIS_HELP_LINK "http://thrift.apache.org")
+ set(CPACK_NSIS_MENU_LINKS
+ "http://thrift.apache.org" "Apache Thrift - Web Site"
+ "https://issues.apache.org/jira/browse/THRIFT" "Apache Thrift - Issues")
+ set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
+ set(CPACK_NSIS_MODIFY_PATH "ON")
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
+else()
+ set(CPACK_GENERATOR "DEB" )
+ set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
endif()
+include(CPack)