Hi there,<div><br></div><div>I use CMake as part of a project configuration system with several other developers. We are very happy with this and it works well for our needs, however I recently stumbled on a problem and I&#39;m looking for guidance. Normally I can easily add source files and resources that must appear in the generated project, but I&#39;m currently struggling to correctly configure this for an Xcode-produced Core Data data model file.</div>
<div><br></div><div>Xcode normally treats this as a file, but it in fact just a directory with a file extension (similar to an Xcode project file itself):</div><div><br></div><div>AppName.xcdatamodeld/</div><div><span class="Apple-style-span">- </span>AppName<span class="Apple-style-span">.xcdatamodel/</span></div>
<div><span class="Apple-style-span">  - contents (file without an extension)</span></div><div><span class="Apple-style-span"><br></span></div><div><span class="Apple-style-span">I&#39;m not that experienced with CMake, and so far I&#39;ve only tried to add them by doing a file() GLOB_RECURSE within the directory where this file resides. The files are then added to the project with add_executable. However, Xcode has the individual files but does not recognise it as a Core Data model file, which is essential for editing this file with the editor. It is also not included correctly when compiling the project.</span></div>
<div><span class="Apple-style-span"><br></span></div><div>Has anybody solved this problem before, or can perhaps point me in the correct direction?</div><div><br></div><div>Kind regards</div><div>James Munro</div>