I am using CPack module in CMake to generate the product installer on macOS. I am trying to install a 3rd party macOS installer package as a prerequisite to our product installer. I tried -
add_executable(
XYZ
IMPORTED
)
set_property(
TARGET XYZ PROPERTY
IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/import/redist/XYZ.pkg
)
install(
IMPORTED_RUNTIME_ARTIFACTS
XYZ
COMPONENT
XYZ
)
However, this doesn’t install the XYZ.pkg though it is part of my final product installer pkg file. Is this the correct way to embed and install 3rd party installer package from my product package installer ?
Edit: Instead of executing the XYZ.pkg installer to install it’s components, my product installer is copying it to my product’s destination folder. I was expecting to chain the install instead.