Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cmake/avendish.max.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,21 @@ function(avnd_create_max_package)
)
endif()

# Max looks for the help patch in <package>/help/<name>.maxhelp.
# Best-effort: it may be absent on some toolchains, so don't fail packaging.
get_target_property(_maxhelp ${_external} AVND_MAX_HELP)
if(_maxhelp)
if(TARGET "${_external}_help")
add_dependencies("${_external}" "${_external}_help")
endif()
get_property(_pkgdir GLOBAL PROPERTY AVND_PACKAGING_DIR)
add_custom_command(TARGET ${_external} POST_BUILD
COMMAND ${CMAKE_COMMAND}
"-DSRC=${CMAKE_BINARY_DIR}/${_maxhelp}" "-DDST=${_pkg}/help"
-P "${_pkgdir}/avendish.packaging.copy_optional.cmake"
VERBATIM)
endif()


# Copy the external (fairly platform-specific)
if(WIN32)
Expand Down
15 changes: 15 additions & 0 deletions cmake/avendish.pd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,21 @@ function(avnd_create_pd_package)
add_custom_command(TARGET ${_external} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${_external_bin}" "${_pkg}/"
)

# Pd opens <c_name>-help.pd from the external's own folder.
# Best-effort: it may be absent on some toolchains, so don't fail packaging.
get_target_property(_pd_help ${_external} AVND_PD_HELP)
if(_pd_help)
if(TARGET "${_external}_help")
add_dependencies("${_external}" "${_external}_help")
endif()
get_property(_pkgdir GLOBAL PROPERTY AVND_PACKAGING_DIR)
add_custom_command(TARGET ${_external} POST_BUILD
COMMAND ${CMAKE_COMMAND}
"-DSRC=${CMAKE_BINARY_DIR}/${_pd_help}" "-DDST=${_pkg}"
-P "${_pkgdir}/avendish.packaging.copy_optional.cmake"
VERBATIM)
endif()
endforeach()

# Copy the support files
Expand Down
Loading