Merge pull request #1475 from admshao/cmake-scripting-issue

cmake: Fix an error when SWIG isn't found
master
Jim 2018-09-10 01:05:04 -07:00 committed by GitHub
commit c69588f286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -62,10 +62,12 @@ find_package(SwigDeps QUIET 2)
if(NOT SWIG_FOUND)
message(STATUS "Scripting: SWIG not found; scripting disabled")
return()
endif()
if(NOT PYTHONLIBS_FOUND AND NOT LUAJIT_FOUND)
message(STATUS "Scripting: Neither Python 3 nor Luajit was found; scripting plugin disabled")
return()
endif()
set(SCRIPTING_ENABLED ON CACHE BOOL "Interal global cmake variable" FORCE)