summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPack.cmake19
-rw-r--r--Templates/CPack.GenericLicense.txt15
-rw-r--r--Templates/CPack.GenericWelcome.txt2
3 files changed, 33 insertions, 3 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 9b3689d..41113d3 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -21,8 +21,15 @@ cpack_set_if_not_set(CPACK_PACKAGE_VERSION
cpack_set_if_not_set(CPACK_PACKAGE_VENDOR "Humanity")
cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"${PROJECT_NAME} built using CMake")
+
cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_FILE
"${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
+cpack_set_if_not_set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_ROOT}/Templates/CPack.GenericLicense.txt")
+cpack_set_if_not_set(CPACK_RESOURCE_FILE_README
+ "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
+cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME
+ "${CMAKE_ROOT}/Templates/CPack.GenericWelcome.txt")
# <project>-<major>.<minor>.<patch>-<release>-<platform>.<pkgtype>
cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME
@@ -32,9 +39,15 @@ cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY
cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
-IF(NOT EXISTS "${CPACK_PACKAGE_DESCRIPTION_FILE}")
- MESSAGE(SEND_ERROR "CPack package description file: \"${CPACK_PACKAGE_DESCRIPTION_FILE}\" could not be found.")
-ENDIF(NOT EXISTS "${CPACK_PACKAGE_DESCRIPTION_FILE}")
+MACRO(cpack_check_file_exists file description)
+IF(NOT EXISTS "${file}")
+ MESSAGE(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.")
+ENDIF(NOT EXISTS "${file}")
+ENDMACRO(cpack_check_file_exists)
+cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description")
+cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource")
+cpack_check_file_exists("${CPACK_RESOURCE_FILE_README}" "readme resource")
+cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource")
# Pick a generator
IF(NOT CPACK_GENERATOR)
diff --git a/Templates/CPack.GenericLicense.txt b/Templates/CPack.GenericLicense.txt
new file mode 100644
index 0000000..97dccdd
--- /dev/null
+++ b/Templates/CPack.GenericLicense.txt
@@ -0,0 +1,15 @@
+LICENSE
+=======
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For more information, please contact the vendor of this package.
diff --git a/Templates/CPack.GenericWelcome.txt b/Templates/CPack.GenericWelcome.txt
new file mode 100644
index 0000000..9dd40ff
--- /dev/null
+++ b/Templates/CPack.GenericWelcome.txt
@@ -0,0 +1,2 @@
+Welcome to installation. This program will guide you through the installation
+of this software.