Turns out the assimp library is not dependent on DirectX, but its tools are.
This is weird, since it means it is not portable. The library is, but its tools aren't. That makes absolutely no sense to me.
Why there are no precompiled libraries like SDL for example ?
I usually don't do this kind of thing but I'll provide you with a compiled copy for MinGW.
Notice that I am only doing this since assimp compile process asks for DirectX by default, what's really misleading. To be fair, their cmake solution overall is not the best I've seen. In addition, boost is trickier to build, there's no magic CMake files there...
I won't include its tools since I don't have DirectX installed, nor plan on installing. I only use OpenGL.
Precompiled binaries of assimp.
This was compiles using:
- MinGW 4.8.1
- CMake 2.8.12
- Boost 1.55.0
under Win7 x64, MinGW 4.8.1.
Updated Download link - https://www.mediafire.com/?xuc3i12wxfsxe8k, as in this post.
Still, I highly recommend that you avoid precompiled binaries. Building libraries is important to know.
The process in this case would be:
- Download Boost and decompress it somewhere (c:/boost, for example)
- In the terminal run:
- cd <boost directory path>
- bootstrap.bat mingw
- b2 --with-filesystem --with-system --with-regex --with-program_options variant=debug,release toolset=gcc link=shared -j 7
- Now open CMake and insert your assimp root folder on the first text box (that reads Where is the code)
- Select where you want to build the binaries, you may use the same as above or add a /build suffix, your choice (reads Where to build the binaries)
- Press the Add Entry button, just under the above text boxes
- Add a variable called BOOST_ROOT with the type Path and insert your boost directory in the value.
- Hit the configure button (it will prompt a configuration warning in red, check the subitems).
- If you want to build the assimp tools (and have the DirectX SDK installed) you may need to update the directx sdk directories.
- If you do not want to build the tools, uncheck the option BUILD_ASSIMP_TOOLS
- If you want the build to be a static version (no need for a dll), check the option BUILD_STATIC_LIB, if not leave it unchecked.
- Hit the configure button again.
- Hit generate.
Now you have prepared the files necessary to compile it. Now through the terminal just go to the folder (the path you inserted on Where to build the binaries) and issue the mingw32-make command.
As an output, you should have two files:
-
- libassimp.dll (probably under the bin directory)
- libassimp.dll.a (probably under the lib directory)
This is for the shared build. I guess the static build would be libassimp.a, but I am guessing.