summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCody Northrop <cnorthrop@google.com>2016-09-01 10:49:59 -0600
committerCody Northrop <cnorthrop@google.com>2016-09-01 10:49:59 -0600
commit492db73040042786b480d9a4dcaea9ad06671173 (patch)
tree3dbef65e7fbf0ae47fdd54aa71b950f8f754c6fb /framework
parent4bc204a4d00b79d1a981e8890c296358a86d2493 (diff)
downloadVK-GL-CTS-492db73040042786b480d9a4dcaea9ad06671173.tar.gz
VK-GL-CTS-492db73040042786b480d9a4dcaea9ad06671173.tar.bz2
VK-GL-CTS-492db73040042786b480d9a4dcaea9ad06671173.zip
CMake: Use find_package to ensure getting python 2.7 instead of 3.x
Change-Id: I0be171e0579acb99428378fa847e619a0d858d55
Diffstat (limited to 'framework')
-rw-r--r--framework/qphelper/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/qphelper/CMakeLists.txt b/framework/qphelper/CMakeLists.txt
index 72878196a..46b6a9fbe 100644
--- a/framework/qphelper/CMakeLists.txt
+++ b/framework/qphelper/CMakeLists.txt
@@ -44,13 +44,13 @@ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qpReleaseInfo.inl")
set(USE_RELEASE_INFO_FILE ON)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/.git")
- find_program(PYTHON_BIN python)
+ find_package(PythonInterp 2.7)
- if (PYTHON_BIN)
+ if (PYTHON_EXECUTABLE)
message(STATUS "Using git revision as release identifier")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qpReleaseInfo.inl
- COMMAND ${PYTHON_BIN} -B ${CMAKE_CURRENT_SOURCE_DIR}/gen_release_info.py --git --out=${CMAKE_CURRENT_BINARY_DIR}/qpReleaseInfo.inl
+ COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_CURRENT_SOURCE_DIR}/gen_release_info.py --git --out=${CMAKE_CURRENT_BINARY_DIR}/qpReleaseInfo.inl
DEPENDS gen_release_info.py ${CMAKE_SOURCE_DIR}/.git/HEAD ${CMAKE_SOURCE_DIR}/.git/index) # \note HEAD updated only when changing branches
add_custom_target(git-rel-info DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpReleaseInfo.inl)
add_dependencies(qphelper git-rel-info)