summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-03 13:30:29 (GMT)
committerBrad King <brad.king@kitware.com>2016-11-03 13:30:29 (GMT)
commit8b75290f13399ba1b32458c5f0090e69efe1eb8c (patch)
tree20219282e52b797e6448cd6eeaf58007d61c5ebe
parent5f7f0ab517d9f4fbc11292a1bada37a74ba69b97 (diff)
parent20cc76c93a7f7ba1dd8a38e8311c0e9702395b27 (diff)
downloadCMake-8b75290f13399ba1b32458c5f0090e69efe1eb8c.zip
CMake-8b75290f13399ba1b32458c5f0090e69efe1eb8c.tar.gz
CMake-8b75290f13399ba1b32458c5f0090e69efe1eb8c.tar.bz2
Merge branch 'cpackifw-search-algorithm' into release
-rw-r--r--Modules/CPackIFW.cmake68
1 files changed, 47 insertions, 21 deletions
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index 6c93ddb..08078cb 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -433,11 +433,15 @@
# Default path
-set(_CPACK_IFW_PATHS
- "${QTIFWDIR}"
- "$ENV{QTIFWDIR}"
- "${QTDIR}"
- "$ENV{QTIFWDIR}")
+foreach(_CPACK_IFW_PATH_VAR "QTIFWDIR" "QTDIR")
+ if(DEFINED ${_CPACK_IFW_PATH_VAR}
+ AND NOT "${${_CPACK_IFW_PATH_VAR}}" STREQUAL "")
+ list(APPEND _CPACK_IFW_PATHS "${${_CPACK_IFW_PATH_VAR}}")
+ endif()
+ if(NOT "$ENV{${_CPACK_IFW_PATH_VAR}}" STREQUAL "")
+ list(APPEND _CPACK_IFW_PATHS "$ENV{${_CPACK_IFW_PATH_VAR}}")
+ endif()
+endforeach()
if(WIN32)
list(APPEND _CPACK_IFW_PATHS
"$ENV{HOMEDRIVE}/Qt"
@@ -447,22 +451,44 @@ else()
"$ENV{HOME}/Qt"
"/opt/Qt")
endif()
-
-set(_CPACK_IFW_SUFFIXES
-# Common
- "bin"
-# Second branch
- "QtIFW2.3.0/bin"
- "QtIFW2.2.0/bin"
- "QtIFW2.1.0/bin"
- "QtIFW2.0.3/bin"
- "QtIFW2.0.1/bin"
- "QtIFW2.0.0/bin"
-# First branch
- "QtIFW-1.6.0/bin"
- "QtIFW-1.5.0/bin"
- "QtIFW-1.4.0/bin"
- "QtIFW-1.3.0/bin")
+list(REMOVE_DUPLICATES _CPACK_IFW_PATHS)
+
+set(_CPACK_IFW_PREFIXES
+ # QtSDK
+ "Tools/QtInstallerFramework/"
+ # Second branch
+ "QtIFW"
+ # First branch
+ "QtIFW-")
+
+set(_CPACK_IFW_VERSIONS
+ "2.3"
+ "2.3.0"
+ "2.2"
+ "2.2.0"
+ "2.1"
+ "2.1.0"
+ "2.0"
+ "2.0.3"
+ "2.0.2"
+ "2.0.1"
+ "2.0.0"
+ "1.6"
+ "1.6.0"
+ "1.5"
+ "1.5.0"
+ "1.4"
+ "1.4.0"
+ "1.3"
+ "1.3.0")
+
+set(_CPACK_IFW_SUFFIXES "bin")
+foreach(_CPACK_IFW_PREFIX ${_CPACK_IFW_PREFIXES})
+ foreach(_CPACK_IFW_VERSION ${_CPACK_IFW_VERSIONS})
+ list(APPEND
+ _CPACK_IFW_SUFFIXES "${_CPACK_IFW_PREFIX}${_CPACK_IFW_VERSION}/bin")
+ endforeach()
+endforeach()
# Look for 'binarycreator'