summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-01-05 14:18:13 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-01-05 14:18:13 (GMT)
commit51a3c204efb61fe4111095e8b8e29bf6ff399277 (patch)
treec54836985cbf1cd9f25bd66def5a74ccc37a563a /CMakeLists.txt
parent7b1440ab9fef6d240eb5beb333ac606f966486a4 (diff)
downloadCMake-51a3c204efb61fe4111095e8b8e29bf6ff399277.zip
CMake-51a3c204efb61fe4111095e8b8e29bf6ff399277.tar.gz
CMake-51a3c204efb61fe4111095e8b8e29bf6ff399277.tar.bz2
ENH: use a safer check for CPack
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1462303..f057887 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,7 +180,7 @@ ADD_CUSTOM_TARGET(uninstall
INCLUDE (${CMake_SOURCE_DIR}/Utilities/Release/Release.cmake)
# If the cmake version includes cpack, use it
-IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.2)
+IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
SET(CPACK_PACKAGE_VENDOR "Kitware")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
@@ -188,4 +188,5 @@ IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.2)
SET(CPACK_PACKAGE_VERSION_MINOR "${CMake_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}")
INCLUDE(CPack)
-ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.2)
+ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+