diff options
author | Brad King <brad.king@kitware.com> | 2021-02-09 13:20:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-02-09 13:20:17 (GMT) |
commit | 18fa819e26c30038e93b0af1f5bbe17d2a776227 (patch) | |
tree | 22dea0fc41d8214fb3a7876fcd1e269d0a5c6679 /Tests | |
parent | 54f15cbb9955b1c9e994108391cc44852f5e794e (diff) | |
parent | 0aabeb0c30bae9509f46fdd2d27e8b724b853d6e (diff) | |
download | CMake-18fa819e26c30038e93b0af1f5bbe17d2a776227.zip CMake-18fa819e26c30038e93b0af1f5bbe17d2a776227.tar.gz CMake-18fa819e26c30038e93b0af1f5bbe17d2a776227.tar.bz2 |
Merge topic '21479-branding-name-cpack-nsis'
0aabeb0c30 CPack/NSIS: Add option for setting branding text
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5784
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CPackNSISGenerator/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CPackNSISGenerator/CMakeLists.txt b/Tests/CPackNSISGenerator/CMakeLists.txt index 8ed4d59..64a8ef6 100644 --- a/Tests/CPackNSISGenerator/CMakeLists.txt +++ b/Tests/CPackNSISGenerator/CMakeLists.txt @@ -17,5 +17,7 @@ set(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}\\\\uninstall.ico") set(CPACK_GENERATOR "NSIS") 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") include(CPack) diff --git a/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake b/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake index bfbcf9c..8bfcf26 100644 --- a/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake +++ b/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake @@ -52,3 +52,11 @@ if("${output_index}" EQUAL "-1") else() message(STATUS "Found DPI-aware") endif() + +file(STRINGS "${project_file}" line REGEX "^BrandingText /TRIMRIGHT \"CMake branding text\"") +string(FIND "${line}" "TRIMRIGHT" output_index) +if("${output_index}" EQUAL "-1") + message(FATAL_ERROR "BrandingText not found in the project") +else() + message(STATUS "Found BrandingText") +endif() |