Conan can be integrated with XCode in two different ways:
- Using the cmake generator to create a conanbuildinfo.cmake file.
- Using the xcode generator to create a conanbuildinfo.xcconfig file.
With the xcode generator¶
You can use the xcode generator to integrate your requirements in your Xcode project.
This generator creates an
xcconfig file, with all the include paths, lib paths, libs, flags etc, that can be imported in your project.
conanfile.txt and change (or add) the xcode generator:
[requires] Poco/1.6.1@lasote/stable [generators] xcode
Install the requirements:
$ conan install
Go to your Xcode project, click on the project and select Add files to.
Click on the project again. In the info/configurations section, choose conanbuildinfo for release and debug.
Build your project as usual.
Check the Reference/Generators/xcode for the complete reference.