diff options
author | Brad King <brad.king@kitware.com> | 2021-08-03 15:06:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-08-03 15:06:45 (GMT) |
commit | a3ddcdb9111f81771dc2c06d88de84fc1cf00e00 (patch) | |
tree | 7b1729ee1578368c6e6967c94301b06079f54ca5 /Tests | |
parent | 1524505e12290e9f4bd9155a6f2e45879d3cb9e5 (diff) | |
parent | 795e406e3bbd99024652f44fc121f36cd291c269 (diff) | |
download | CMake-a3ddcdb9111f81771dc2c06d88de84fc1cf00e00.zip CMake-a3ddcdb9111f81771dc2c06d88de84fc1cf00e00.tar.gz CMake-a3ddcdb9111f81771dc2c06d88de84fc1cf00e00.tar.bz2 |
Merge topic 'nsis_ignore_license_page'
795e406e3b CPack/NSIS: Add option to not display license page
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6422
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CPackNSISGenerator/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CPackNSISGenerator/CMakeLists.txt b/Tests/CPackNSISGenerator/CMakeLists.txt index 64a8ef6..5d6320b 100644 --- a/Tests/CPackNSISGenerator/CMakeLists.txt +++ b/Tests/CPackNSISGenerator/CMakeLists.txt @@ -19,5 +19,6 @@ set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) set(CPACK_NSIS_MANIFEST_DPI_AWARE ON) set(CPACK_NSIS_BRANDING_TEXT "CMake branding text") set(CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION "RIGHT") +set(CPACK_NSIS_IGNORE_LICENSE_PAGE ON) include(CPack) diff --git a/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake b/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake index 8bfcf26..31a2560 100644 --- a/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake +++ b/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake @@ -60,3 +60,12 @@ if("${output_index}" EQUAL "-1") else() message(STATUS "Found BrandingText") endif() + +# license page should not be present +file(STRINGS "${project_file}" line REGEX "!insertmacro MUI_PAGE_LICENSE") +string(FIND "${line}" "MUI_PAGE_LICENSE" output_index) +if("${output_index}" EQUAL "-1") + message(STATUS "License not found in the project") +else() + message(FATAL_ERROR "License found in the project") +endif() |