summaryrefslogtreecommitdiffstats
path: root/Modules/CPackIFW.cmake
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2014-10-04 18:55:43 (GMT)
committerKonstantin Podsvirov <konstantin@podsvirov.pro>2014-10-04 18:55:43 (GMT)
commitf9f748745c6f4ef5b2dbf6d0732bc67a23d1cc63 (patch)
tree7c01ed646fa4f1ff95ad8f03d10ff4fa00dd21c1 /Modules/CPackIFW.cmake
parentab74ad5a5f26049effbd1eac119ec40e438f38df (diff)
downloadCMake-f9f748745c6f4ef5b2dbf6d0732bc67a23d1cc63.zip
CMake-f9f748745c6f4ef5b2dbf6d0732bc67a23d1cc63.tar.gz
CMake-f9f748745c6f4ef5b2dbf6d0732bc67a23d1cc63.tar.bz2
CPackIFW: Search algorithm update
Variables like CPACK_IFW_*_EXECUTABLE_FOUND now not needed
Diffstat (limited to 'Modules/CPackIFW.cmake')
-rw-r--r--Modules/CPackIFW.cmake63
1 files changed, 22 insertions, 41 deletions
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index 8463b5d..27546ac 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -25,6 +25,8 @@
# and Mac OS X.
#
# To use CPack ``IFW`` generator you must also install QtIFW_.
+# If you are not using the default path for the installation, please set
+# the path to the variable ``QTIFWDIR``.
#
# Variables
# ^^^^^^^^^
@@ -95,7 +97,7 @@
# Additional prepared packages dirs that will be used to resolve
# dependent components.
#
-# Advanced
+# Tools
# """"""""
#
# .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE
@@ -104,20 +106,12 @@
#
# This variable is cached and can be configured user if need.
#
-# .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND
-#
-# True if the "binarycreator" command line client was found.
-#
# .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE
#
# The path to "repogen" command line client.
#
# This variable is cached and can be configured user if need.
#
-# .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE_FOUND
-#
-# True if the "repogen" command line client was found.
-#
# Commands
# ^^^^^^^^^
#
@@ -264,48 +258,41 @@
# Default path
+set(_CPACK_IFW_PATHS
+ "${QTIFWDIR}"
+ "$ENV{QTIFWDIR}"
+ "${QTDIR}"
+ "$ENV{QTIFWDIR}")
if(WIN32)
- set(_CPACK_IFW_PATHS
- "$ENV{HOMEDRIVE}/Qt"
- "C:/Qt"
- )
+ list(APPEND _CPACK_IFW_PATHS
+ "$ENV{HOMEDRIVE}/Qt"
+ "C:/Qt")
else()
- set(_CPACK_IFW_PATHS
- "$ENV{HOME}/Qt"
- "/opt/Qt"
- )
+ list(APPEND _CPACK_IFW_PATHS
+ "$ENV{HOME}/Qt"
+ "/opt/Qt")
endif()
set(_CPACK_IFW_SUFFIXES
- "QtIFW-1.7.0/bin"
- "QtIFW-1.6.0/bin"
- "QtIFW-1.5.0/bin"
- "QtIFW-1.4.0/bin"
- "QtIFW-1.3.0/bin"
-)
+ "bin"
+ "QtIFW-1.7.0/bin"
+ "QtIFW-1.6.0/bin"
+ "QtIFW-1.5.0/bin"
+ "QtIFW-1.4.0/bin"
+ "QtIFW-1.3.0/bin")
# Look for 'binarycreator'
-if(NOT CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND)
-
find_program(CPACK_IFW_BINARYCREATOR_EXECUTABLE
NAMES binarycreator
PATHS ${_CPACK_IFW_PATHS}
PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
- DOC "QtIFW binarycreator command line client"
- )
-mark_as_advanced(CPACK_IFW_BINARYCREATOR_EXECUTABLE)
+ DOC "QtIFW binarycreator command line client")
-if(EXISTS ${CPACK_IFW_BINARYCREATOR_EXECUTABLE})
- set(CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND 1)
-endif()
-
-endif() # NOT CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND
+mark_as_advanced(CPACK_IFW_BINARYCREATOR_EXECUTABLE)
# Look for 'repogen'
-if(NOT CPACK_IFW_REPOGEN_EXECUTABLE_FOUND)
-
find_program(CPACK_IFW_REPOGEN_EXECUTABLE
NAMES repogen
PATHS ${_CPACK_IFW_PATHS}
@@ -314,12 +301,6 @@ find_program(CPACK_IFW_REPOGEN_EXECUTABLE
)
mark_as_advanced(CPACK_IFW_REPOGEN_EXECUTABLE)
-if(EXISTS ${CPACK_IFW_REPOGEN_EXECUTABLE})
- set(CPACK_IFW_REPOGEN_EXECUTABLE_FOUND 1)
-endif()
-
-endif() # NOT CPACK_IFW_REPOGEN_EXECUTABLE_FOUND
-
#
## Next code is included only once
#