CMake: Get Interrogated modules to install.

This commit is contained in:
Sam Edwards 2014-02-06 16:33:34 -07:00
parent 5e78a80acc
commit e5a6259e46

View File

@ -272,3 +272,14 @@ function(add_python_module module)
endif()
endif()
endfunction(add_python_module)
if(HAVE_PYTHON)
# We have to create an __init__.py so that Python 2.x can recognize 'panda3d'
# as a package.
file(WRITE "${PROJECT_BINARY_DIR}/panda3d/__init__.py" "")
# The Interrogate path needs to be installed to the architecture-dependent
# Python directory.
install(DIRECTORY "${PROJECT_BINARY_DIR}/panda3d" DESTINATION "${PYTHON_LIB_INSTALL_DIR}")
endif()