CMake: Make INTERROGATE_PYTHON_INTERFACE option dependent

This also makes it sufficient for turning on Interrogate.
This commit is contained in:
Sam Edwards 2018-06-13 18:49:28 -06:00
parent d6d6df83ef
commit 21a30a8429
4 changed files with 7 additions and 5 deletions

View File

@ -237,7 +237,7 @@ endfunction(interrogate_sources)
# Python module when it's initialized.
#
function(add_python_module module)
if(NOT HAVE_PYTHON OR NOT INTERROGATE_PYTHON_INTERFACE)
if(NOT INTERROGATE_PYTHON_INTERFACE)
return()
endif()

View File

@ -6,6 +6,8 @@
# generate build scripts appropriate to each environment.
#
include(CMakeDependentOption)
# Define the plaform we are building on.
# The values "UNIX", "WIN32", "MINGW", "MSYS", and "CYGWIN"
# are automatically provided by CMAKE. "APPLE" is also provided by
@ -255,11 +257,11 @@ mark_as_advanced(HAVE_P3D_RTDIST PANDA_PACKAGE_VERSION PANDA_PACKAGE_HOST)
# The following options relate to interrogate, the tool that is
# used to generate bindings for non-C++ languages.
option(INTERROGATE_PYTHON_INTERFACE
cmake_dependent_option(INTERROGATE_PYTHON_INTERFACE
"Do you want to generate a Python-callable interrogate interface?
This is only necessary if you plan to make calls into Panda from a
program written in Python. This is done only if HAVE_PYTHON is also
true." ON)
true." ON "HAVE_PYTHON" OFF)
set(INTERROGATE_C_INTERFACE
"Do you want to generate a C-callable interrogate interface? This

View File

@ -256,7 +256,7 @@ else()
endif()
message("")
if(HAVE_INTERROGATE AND HAVE_PYTHON)
if(INTERROGATE_PYTHON_INTERFACE)
message("Compilation will generate Python interfaces for Python ${PYTHON_VERSION_STRING}.")
else()
message("Configuring Panda WITHOUT Python interfaces.")

View File

@ -46,7 +46,7 @@ install(FILES ${P3INTERROGATEDB_HEADERS} DESTINATION include/panda3d)
# Note we don't use the regular Interrogate macros; this has some custom flags
# that would make it not worthwhile.
if(NOT HAVE_PYTHON OR NOT INTERROGATE_PYTHON_INTERFACE)
if(NOT INTERROGATE_PYTHON_INTERFACE)
return()
endif()