XCode, CMake and Assimp

Dear all,

I write you because I am currently coding a very basic videogame engine in OpenGL/GLUT/C++, and I would now like to add the chance to import a mesh realized in almost every modelling/sculpting software via Assimp.

I kind of understood how Assimp works, and how to implement it in my code. However, I cannot manage to build the libraries and corrently compile and link them to my project in XCode.

For instance, this is my project in XCode

[ATTACH=CONFIG]1550[/ATTACH]

with a root in a folder containing a folder named “MyFirstGame”, containing the source files of the project, as well as a glm folder containing the glm library.

Is it possible to have a step-by-step full-basic guide to add the Assimp library to this code via CMake?
Thanks in advance :slight_smile:

[QUOTE=Charogne;1288366]I write you because I am currently coding a very basic videogame engine in OpenGL/GLUT/C++, and I would now like to add the chance to import a mesh realized in almost every modelling/sculpting software via Assimp.

Is it possible to have a step-by-step full-basic guide to add the Assimp library to this code via CMake?[/QUOTE]

Putting CMake aside for a second, take a look at:

As for CMake, it’s just a tool used to generate build rules. You can find a number of generic tutorials on how to use it.

CMake does not build the libraries, it “only” generates platform specific Makefiles (or equivalents). You still need to compile and install the compiled libraries and headers.

For the library you want to build the following steps are necessary (I am doing them on Linux, but this should be applicable to Mac OS X as well).

git clone https://github.com/assimp/assimp.git
cd assimp
mkdir build
cd build
cmake …
The build folder now contains a Makefile, and when you run make, the library will be compiled.

After this step, the freshly built library is located at build/code/libassimp.so.

You could leave the library as well as the include files there and reference them when compiling/linking your project. Usually, you want to install them, so they are available systemwide and can be found automatically.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.