mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
CMake: Don't use pzip when not built
This commit is contained in:
parent
7e4f9b4c8e
commit
f54b4b61dd
@ -90,7 +90,7 @@ if(BUILD_MODELS)
|
||||
DESTINATION "${PROJECT_BINARY_DIR}/models/maps"
|
||||
)
|
||||
run_pzip(models
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/models"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/models/"
|
||||
"${PROJECT_BINARY_DIR}/models"
|
||||
*.egg
|
||||
)
|
||||
@ -99,7 +99,7 @@ if(BUILD_MODELS)
|
||||
FILES_MATCHING PATTERN *.rgb PATTERN *.png PATTERN *.jpg PATTERN *.wav
|
||||
)
|
||||
run_pzip(dmodels
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/dmodels/src"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/dmodels/src/"
|
||||
"${PROJECT_BINARY_DIR}/models"
|
||||
*.egg
|
||||
)
|
||||
|
@ -1,4 +1,12 @@
|
||||
function(run_pzip target_name source destination glob)
|
||||
if(NOT TARGET pzip)
|
||||
# If pzip isn't built, we just copy instead.
|
||||
file(COPY "${source}"
|
||||
DESTINATION "${destination}"
|
||||
FILES_MATCHING PATTERN "${glob}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE files RELATIVE "${source}" "${source}/${glob}")
|
||||
|
||||
set(dstfiles "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user