One of the items I add to the RESOURCE property for my macOS app bundle is a directory. CMake happily creates the bundle with that directory and its hierarchy in the “Resources” directory. The app works fine.
However when I add an install command for this app. bundle CMake raises an error
install RESOURCE given directory
This is the install command:
install(TARGETS vkloadtests
BUNDLE
DESTINATION ${CMAKE_INSTALL_PREFIX}/Applications
COMPONENT VkLoadTestApp
)
Am I doing the installation wrong? (The documentation on installing a BUNDLE is virtually non-existent.) Is it a bug in CMake? install() has no need to be separately installing the resources here. All it needs to do is copy the already built bundle to the DESTINATION.
Only the macOS bundle needs the directory in resources. I can’t change it because it is needed by a third-party dylib included in the bundle. install
is probably set up so a single command can be used for multiple platforms so is checking the RESOURCE property even though the specific command, which is also macOS only, does not reference RESOURCE.
Is there a way to explicitly tell it to ignore RESOURCE?
I thought about using install(DIRECTORY ...)
instead but I don’t know how to tie that to the installation of a particular target.