mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
CMake: Defer pzip's directory creation to build-time.
This commit is contained in:
parent
f0c9772396
commit
cb0def4eb3
@ -13,17 +13,15 @@ function(run_pzip target_name source destination glob)
|
|||||||
set(dstfiles "")
|
set(dstfiles "")
|
||||||
foreach(filename ${files})
|
foreach(filename ${files})
|
||||||
string(REGEX REPLACE "^/" "" filename "${filename}")
|
string(REGEX REPLACE "^/" "" filename "${filename}")
|
||||||
file(RELATIVE_PATH srcfile "${destination}" "${source}/${filename}")
|
|
||||||
|
|
||||||
get_filename_component(dstdir "${destination}/${filename}" DIRECTORY)
|
get_filename_component(dstdir "${destination}/${filename}" DIRECTORY)
|
||||||
file(MAKE_DIRECTORY "${dstdir}")
|
|
||||||
|
|
||||||
set(dstfile "${filename}.pz")
|
set(dstfile "${filename}.pz")
|
||||||
list(APPEND dstfiles "${destination}/${dstfile}")
|
list(APPEND dstfiles "${destination}/${dstfile}")
|
||||||
|
|
||||||
add_custom_command(OUTPUT "${destination}/${dstfile}"
|
add_custom_command(OUTPUT "${destination}/${dstfile}"
|
||||||
COMMAND host_pzip -c > "${dstfile}" < "${srcfile}"
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${dstdir}"
|
||||||
WORKING_DIRECTORY "${destination}"
|
COMMAND host_pzip -c > "${destination}/${dstfile}" < "${source}/${filename}"
|
||||||
DEPENDS host_pzip
|
DEPENDS host_pzip
|
||||||
COMMENT "")
|
COMMENT "")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user