Browse Source

CMake: Get Interrogated modules to install.

Sam Edwards 12 years ago
parent
commit
e5a6259e46
1 changed files with 11 additions and 0 deletions
  1. 11 0
      cmake/macros/Interrogate.cmake

+ 11 - 0
cmake/macros/Interrogate.cmake

@@ -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()