summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-11-27 13:30:35 +0100
committerMichał Górny <mgorny@gentoo.org>2016-11-30 10:42:07 +0100
commitbeaae227169e69fea254a848ce1313f4491f53b1 (patch)
tree4a032a5848ba4785625ae5b7bdb88964164c4c2c /dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch
parentmedia-sound/zynaddsubfx: remove old (diff)
downloadgentoo-beaae227169e69fea254a848ce1313f4491f53b1.tar.gz
gentoo-beaae227169e69fea254a848ce1313f4491f53b1.tar.bz2
gentoo-beaae227169e69fea254a848ce1313f4491f53b1.zip
dev-util/cmake: Support indicating Gentoo build via CMAKE_GENTOO_BUILD
Support indicating Gentoo package build using a new CMAKE_GENTOO_BUILD CMake variable, as an alternative to relying on CMAKE_BUILD_TYPE being equal to Gentoo. This makes it possible to reduce reliance on a custom build type in the future.
Diffstat (limited to 'dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch')
-rw-r--r--dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch b/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch
index 3abb2e4065e8..bb3ca9580ad9 100644
--- a/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch
+++ b/dev-util/cmake/files/cmake-3.1.0-FindPythonInterp.patch
@@ -5,7 +5,7 @@
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
endif()
+
-+if (CMAKE_BUILD_TYPE STREQUAL Gentoo)
++if (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo)
+ set(_Python_NAMES python)
+endif()
+
@@ -17,7 +17,7 @@
# Search for newest python version if python executable isn't found
-if(NOT PYTHON_EXECUTABLE)
-+if(NOT PYTHON_EXECUTABLE AND NOT CMAKE_BUILD_TYPE STREQUAL Gentoo)
++if(NOT PYTHON_EXECUTABLE AND NOT (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo))
foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS)
set(_Python_NAMES python${_CURRENT_VERSION})
if(WIN32)