I am trying to build an Xcode 9 project with cmake (3.8.0). It consists of an app target and an appex (extension) target, which needs to be copied into the app's PlugIns directory via a "Copy Files Phase" (or "Embed App Extension Phase") in the Build Phases.
I tried several attempts like calling
set_source_files_properties(${myFile} PROPERTIES MACOSX_PACKAGE_LOCATION PlugIns)
but with no luck so far.
I believe the difficulty (for cmake) is that the acutal file "myExtension.appex" is created at build time and therefor hardcoding the path to add it as a source file doesn't seem to work.
Any help would be appreciated!