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
1 changed files with 1 additions and 1 deletions

View File

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