Allow PYTHON_LIBRARY and PYTHON_INCLUDE_DIR to actually be overridden
authorKevin Squire <kevin@secondspectrum.com>
Fri, 16 Jan 2015 02:13:06 +0000 (18:13 -0800)
committerKevin Squire <kevin@secondspectrum.com>
Fri, 27 Mar 2015 00:48:03 +0000 (17:48 -0700)
cmake/OpenCVDetectPython.cmake

index 8ed425f..ed75698 100644 (file)
@@ -75,10 +75,10 @@ function(find_python preferred_version min_version library_env include_dir_env
 
     if(NOT ANDROID AND NOT IOS)
       ocv_check_environment_variables(${library_env} ${include_dir_env})
-      if(${${library_env}})
+      if(NOT ${${library_env}} EQUAL "")
           set(PYTHON_LIBRARY "${${library_env}}")
       endif()
-      if(${${include_dir_env}})
+      if(NOT ${${include_dir_env}} EQUAL "")
           set(PYTHON_INCLUDE_DIR "${${include_dir_env}}")
       endif()