summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakePresetsPackage/Good-package-package-version-check.cmake
blob: dba9110931d9f0eb090e8df3cf9085bd4de0d496 (plain)
1
2
3
4
5
6
7
include("${RunCMake_TEST_BINARY_DIR}/default/CPackConfig.cmake")

file(READ "${RunCMake_TEST_BINARY_DIR}/default/${CPACK_PACKAGE_FILE_NAME}.json" contents)
string(JSON package_version GET "${contents}" packageVersion)
if(NOT package_version STREQUAL "1.0")
  set(RunCMake_TEST_FAILED "Expected package version to be \"1.0\" but it was \"${package_version}\"")
endif()