Xcode generator: Object library output project does not work as a dependency to another project
Steps:
- Generate an Xcode project from an CMake object library project
- Use the outputted project as a dependency for another Xcode project (drag the generated Xcode project into the parent, set up target dependencies, build the parent.)
- Build will fail
The issue seems to be that the CMake generated subproject adopts the intermediate builds directory of the parent project, so the object files are not generated where the Cmake project will expect them. Specifically, build variables like PROJECT_TEMP_DIR are altered by the parent. The Cmake project bases it's OBJECT_FILE_DIR path on this path.
Could be fixed by either hardcoding the output location of the .o's or varying the location of where the .o's are expected to be found.
CONFIGURATION_BUILD_DIR is already customized by Cmake, but this isn't sufficient. CONFIGURATION_TEMP_DIR is where the .o's live, I believe.