diff --git a/cmake/macros/RunPzip.cmake b/cmake/macros/RunPzip.cmake index 3a4d2e4d0f..1e4e777c20 100644 --- a/cmake/macros/RunPzip.cmake +++ b/cmake/macros/RunPzip.cmake @@ -1,5 +1,5 @@ function(run_pzip target_name source destination glob) - if(NOT TARGET pzip) + if(NOT TARGET host_pzip) # If pzip isn't built, we just copy instead. file(COPY "${source}" DESTINATION "${destination}" @@ -22,9 +22,9 @@ function(run_pzip target_name source destination glob) list(APPEND dstfiles "${destination}/${dstfile}") add_custom_command(OUTPUT "${destination}/${dstfile}" - COMMAND pzip -c > "${dstfile}" < "${srcfile}" + COMMAND host_pzip -c > "${dstfile}" < "${srcfile}" WORKING_DIRECTORY "${destination}" - DEPENDS pzip + DEPENDS host_pzip COMMENT "") endforeach(filename) diff --git a/panda/src/downloadertools/CMakeLists.txt b/panda/src/downloadertools/CMakeLists.txt index a306fe7ebb..5de61edac2 100644 --- a/panda/src/downloadertools/CMakeLists.txt +++ b/panda/src/downloadertools/CMakeLists.txt @@ -38,6 +38,10 @@ if(HAVE_ZLIB) add_executable(pzip pzip.cxx) target_link_libraries(pzip panda) + if(NOT CMAKE_CROSSCOMPILING) + add_executable(host_pzip ALIAS pzip) + endif() + add_executable(punzip punzip.cxx) target_link_libraries(punzip panda)