Only look for Python binary when building tests

Fixes #1374
This commit is contained in:
Martin Hořeňovský 2018-09-02 18:54:41 +02:00
parent efbf50fc7d
commit fcd91c7d6b

View File

@ -37,8 +37,8 @@ if(USE_WMAIN)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wmainCRTStartup") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wmainCRTStartup")
endif() endif()
find_package(PythonInterp)
if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT) if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT)
find_package(PythonInterp)
if (NOT PYTHONINTERP_FOUND) if (NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Python not found, but required for tests") message(FATAL_ERROR "Python not found, but required for tests")
endif() endif()