mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
CMake: fix pandac/PandaModules.py to match makepanda's
This commit is contained in:
parent
921cbc6bae
commit
9da7988909
@ -53,6 +53,7 @@ if(HAVE_PYTHON)
|
|||||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pandac/PandaModules.py"
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pandac/PandaModules.py"
|
||||||
"\"This module is deprecated. Import from panda3d.core and other panda3d.* modules instead.\"
|
"\"This module is deprecated. Import from panda3d.core and other panda3d.* modules instead.\"
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
print(\"Warning: pandac.PandaModules is deprecated, import from panda3d.core instead\")\n")
|
print(\"Warning: pandac.PandaModules is deprecated, import from panda3d.core instead\")\n")
|
||||||
|
|
||||||
foreach(module ${ALL_INTERROGATE_MODULES})
|
foreach(module ${ALL_INTERROGATE_MODULES})
|
||||||
@ -66,6 +67,19 @@ except ImportError as err:
|
|||||||
")
|
")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/pandac/PandaModules.py"
|
||||||
|
"from direct.showbase import DConfig
|
||||||
|
|
||||||
|
def get_config_showbase():
|
||||||
|
return DConfig
|
||||||
|
|
||||||
|
def get_config_express():
|
||||||
|
return DConfig
|
||||||
|
|
||||||
|
getConfigShowbase = get_config_showbase
|
||||||
|
getConfigExpress = get_config_express
|
||||||
|
")
|
||||||
|
|
||||||
# Now install ourselves:
|
# Now install ourselves:
|
||||||
install_python_package(pandac SOURCE "${CMAKE_CURRENT_BINARY_DIR}/pandac" LIB COMPONENT Direct)
|
install_python_package(pandac SOURCE "${CMAKE_CURRENT_BINARY_DIR}/pandac" LIB COMPONENT Direct)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user