summaryrefslogtreecommitdiffstats
path: root/Tests/CPackWiXGenerator/CMakeLists.txt
diff options
context:
space:
mode:
authorNils Gladitz <gladitz@scivis.de>2012-10-03 14:08:49 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-12-03 16:00:31 (GMT)
commit85baac1503c638756211ba07c4c25128e6d3d845 (patch)
treec10451adf45938e9bc6573d9edd09d4e3a67de67 /Tests/CPackWiXGenerator/CMakeLists.txt
parent581b0c0d078b5f07f68a53b118f44fc6e8313601 (diff)
downloadCMake-85baac1503c638756211ba07c4c25128e6d3d845.zip
CMake-85baac1503c638756211ba07c4c25128e6d3d845.tar.gz
CMake-85baac1503c638756211ba07c4c25128e6d3d845.tar.bz2
CPack: Add a WiX Generator (#11575)
This new CPack generator produces an *.msi installer file. Requires having the WiX Toolset installed in order to work properly. Download the WiX Toolset installer "WiX36.exe" here: http://wix.codeplex.com/releases/view/93929
Diffstat (limited to 'Tests/CPackWiXGenerator/CMakeLists.txt')
-rw-r--r--Tests/CPackWiXGenerator/CMakeLists.txt73
1 files changed, 73 insertions, 0 deletions
diff --git a/Tests/CPackWiXGenerator/CMakeLists.txt b/Tests/CPackWiXGenerator/CMakeLists.txt
new file mode 100644
index 0000000..ce02f11
--- /dev/null
+++ b/Tests/CPackWiXGenerator/CMakeLists.txt
@@ -0,0 +1,73 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(CPackWiXGenerator)
+
+add_library(mylib mylib.cpp)
+
+add_executable(mylibapp mylibapp.cpp)
+target_link_libraries(mylibapp mylib)
+
+install(TARGETS mylib
+ ARCHIVE
+ DESTINATION lib
+ COMPONENT libraries)
+
+install(TARGETS mylibapp
+ RUNTIME
+ DESTINATION bin
+ COMPONENT applications)
+
+install(FILES mylib.h "file with spaces.h"
+ DESTINATION include
+ COMPONENT headers)
+
+set(CPACK_GENERATOR "WIX")
+
+set(CPACK_PACKAGE_NAME "MyLib")
+set(CPACK_PACKAGE_VENDOR "CMake.org")
+set(CPACK_PACKAGE_CONTACT "somebody@cmake.org")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
+ "MyLib - CPack Component Installation Example")
+
+set(CPACK_PACKAGE_VERSION_MAJOR "1")
+set(CPACK_PACKAGE_VERSION_MINOR "0")
+set(CPACK_PACKAGE_VERSION_PATCH "0")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "CPack Component Example")
+
+set(CPACK_WIX_UPGRADE_GUID "BF20CE5E-7F7C-401D-8F7C-AB45E8D170E6")
+
+include(CPack)
+
+cpack_add_install_type(Full DISPLAY_NAME "Everything")
+cpack_add_install_type(Developer)
+
+cpack_add_component_group(Runtime)
+
+cpack_add_component_group(Development
+ EXPANDED
+ DESCRIPTION "All of the tools you'll ever need to develop software")
+
+cpack_add_component(applications
+ DISPLAY_NAME "MyLib Application"
+ DESCRIPTION "An extremely useful application that makes use of MyLib"
+ GROUP Runtime
+ INSTALL_TYPES Full)
+
+cpack_add_component(documentation
+ DISPLAY_NAME "MyLib Documentation"
+ DESCRIPTION "The extensive suite of MyLib Application documentation files"
+ GROUP Runtime
+ INSTALL_TYPES Full)
+
+cpack_add_component(libraries
+ DISPLAY_NAME "Libraries"
+ DESCRIPTION "Static libraries used to build programs with MyLib"
+ GROUP Development
+ INSTALL_TYPES Developer Full)
+
+cpack_add_component(headers
+ DISPLAY_NAME "C++ Headers"
+ DESCRIPTION "C/C++ header files for use with MyLib"
+ GROUP Development
+ DEPENDS libraries
+ INSTALL_TYPES Developer Full)