summaryrefslogtreecommitdiff
path: root/Tests/CPackComponentsForAll
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CPackComponentsForAll')
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake11
1 files changed, 5 insertions, 6 deletions
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 9a022c580..0b6d07d97 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -9,11 +9,10 @@ endif()
if(NOT CPackGen)
message(FATAL_ERROR "CPackGen not set")
endif()
-get_filename_component(CPACK_LOCATION ${CMAKE_COMMAND} PATH)
-set(CPackCommand "${CPACK_LOCATION}/cpack")
-message("cpack = ${CPackCommand}")
-if(NOT CPackCommand)
- message(FATAL_ERROR "CPackCommand not set")
+
+message("CMAKE_CPACK_COMMAND = ${CMAKE_CPACK_COMMAND}")
+if(NOT CMAKE_CPACK_COMMAND)
+ message(FATAL_ERROR "CMAKE_CPACK_COMMAND not set")
endif()
if(NOT CPackComponentWay)
@@ -92,7 +91,7 @@ endif()
message("config_args = ${config_args}")
message("config_verbose = ${config_verbose}")
-execute_process(COMMAND ${CPackCommand} ${config_verbose} -G ${CPackGen} ${config_args}
+execute_process(COMMAND ${CMAKE_CPACK_COMMAND} ${config_verbose} -G ${CPackGen} ${config_args}
RESULT_VARIABLE CPack_result
OUTPUT_VARIABLE CPack_output
ERROR_VARIABLE CPack_error