mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
CMake: Fix PandaModules.py not copying
This commit is contained in:
parent
60c1570db8
commit
fc54251f61
@ -36,10 +36,11 @@ if(DEFINED SOURCE_DIR)
|
|||||||
file(TIMESTAMP "${OUTPUT_DIR}/${py_file}" dst_stamp)
|
file(TIMESTAMP "${OUTPUT_DIR}/${py_file}" dst_stamp)
|
||||||
|
|
||||||
# The file is only copied if:
|
# The file is only copied if:
|
||||||
# - there's an __init__.py in its dir (i.e. file belongs to a package), and
|
# - there's an __init__.py in its dir (or file is in the root) (i.e. file belongs to a package), and
|
||||||
# - the modification timestamp differs (i.e. file changed or never copied)
|
# - the modification timestamp differs (i.e. file changed or never copied)
|
||||||
if(EXISTS "${SOURCE_DIR}/${py_file_parent}/__init__.py"
|
if((py_file_parent STREQUAL "." OR NOT py_file_parent
|
||||||
AND NOT src_stamp STREQUAL dst_stamp)
|
OR EXISTS "${SOURCE_DIR}/${py_file_parent}/__init__.py")
|
||||||
|
AND NOT src_stamp STREQUAL dst_stamp)
|
||||||
|
|
||||||
file(COPY "${SOURCE_DIR}/${py_file}" DESTINATION "${OUTPUT_DIR}/${py_file_parent}")
|
file(COPY "${SOURCE_DIR}/${py_file}" DESTINATION "${OUTPUT_DIR}/${py_file_parent}")
|
||||||
set(changed YES)
|
set(changed YES)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user