CMakeLists.txt - Purpose and Usage

CMakeLists.txt - Purpose and Usage
0.0 0


Question: What is the CMakeLists.txt file in the template project for?

I am currently trying to automate adding files to a project, as adding them manually to each platform is quite annoying.

In the process I discovered the CMakeLists.txt and that it is possible to generate an XCode project automatically from this file. Unfortunately the created project does not compile, but throws weird errors like:

syntax error : ‘string’

Looking at the CMakeLists.txt file at close it seems, that it is only configured to create the linux project. Can someone confirm that?


same question. Especially on cocos2d-x 3.0beta, it seem lost some header includes in cocos2d.h, I think it should use CMakeList to add them


CMakeLists is a makefile for use with CMake ( It can generate XCode projects. I dont know its current status with doing it. I haven’t used CMake in a number of months at this point.

If you want an XCode project, why not use It will give you Android, Linux, VS as well, but you could just delete those if you aren’t going to target those platforms…