summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPackRPM.cmake5
-rw-r--r--Modules/FindPythonLibs.cmake10
-rw-r--r--Source/CMakeVersion.cmake2
3 files changed, 13 insertions, 4 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index cba746f..ae93512 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -488,7 +488,10 @@ FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
-ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ ELSE(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ # Do not forget to unset previously set header (from previous component)
+ UNSET(TMP_RPM_${_RPM_SPEC_HEADER})
+ ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
ENDFOREACH(_RPM_SPEC_HEADER)
# CPACK_RPM_SPEC_INSTALL_POST
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 478ebcb..11ff196 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -45,13 +45,19 @@ IF(PythonLibs_FIND_VERSION)
STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
STRING(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
UNSET(_PYTHON_FIND_OTHER_VERSIONS)
- IF(NOT PythonLibs_FIND_VERSION_EXACT)
+ IF(PythonLibs_FIND_VERSION_EXACT)
+ IF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
+ ELSE(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
+ ENDIF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ ELSE(PythonLibs_FIND_VERSION_EXACT)
FOREACH(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
IF(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
LIST(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
ENDIF()
ENDFOREACH()
- ENDIF(NOT PythonLibs_FIND_VERSION_EXACT)
+ ENDIF(PythonLibs_FIND_VERSION_EXACT)
UNSET(_PYTHON_FIND_MAJ_MIN)
UNSET(_PYTHON_FIND_MAJ)
ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 1eb42be..345a56f 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8)
SET(CMake_VERSION_PATCH 8)
-SET(CMake_VERSION_TWEAK 20120605)
+SET(CMake_VERSION_TWEAK 20120612)
#SET(CMake_VERSION_RC 1)