Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: XCode, CMake and Assimp

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2017
    Posts
    7

    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

    Click image for larger version. 

Name:	Schermata 2017-08-31 alle 19.49.34.jpg 
Views:	51 
Size:	8.7 KB 
ID:	2470

    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

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,155
    Quote Originally Posted by Charogne View Post
    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?
    Putting CMake aside for a second, take a look at:

    * Tutorial 38: Skeletal Animation With Assimp

    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.

  3. #3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •