Search code examples
cmakeubuntu-12.04allegro5

building allegro5 on ubuntu 12.04


I'm trying to install allegro5 on ubuntu 12.04, and i'm following this tutorial: http://wiki.allegro.cc/index.php?title=Ubuntu_and_Allegro_5 at first I couldn't find where allegro5 was installed, i ran find, and it turned out allegro5 was in /usr/local/allegro5/. So i proceeded to step 'build allegro'.

and that's where problem occurred, "cmake .. " gives me this error:

CMake Error: The source directory "/usr/local/include/allegro5" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.


Solution

  • Cmake's source directory should be the root folder containing the Allegro source. So you should be running cmake .. from your build folder (which is in the Allegro folder).

    Check out this tutorial too if you're still having trouble. http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_SVN/Linux/Debian I just used it to install Allegro on Ubuntu 13.04 and it worked nicely.

    P.S. I think that on Ubuntu /usr/local/lib is not in the search path for libraries, so you may get an error when you first try to run a compiled program. You can add it by putting the line include /usr/local/lib to the file /etc/ld.so.conf and then running sudo ldconfig to update the path.