I think that your actual problem is the leading /
in this line:
set(allegro5_LIBS /./lib/allegro5/liballegro.so /./lib/allegro5/liballegro_primitives.so)
A leading slash will tell cmake
to look for an absolute path (like /usr/lib...) and not prefix it with a CMAKE_*_DIR
. Try this
set(allegro5_LIBS ${CMAKE_SOURCE_DIR}/lib/allegro5/liballegro.so ${CMAKE_SOURCE_DIR}/lib/allegro5/liballegro_primitives.so)
However I strong discourage you to include pre-built libraries in your project. If you can, integrate a tar-ball or a git-submodule. If the project you include is a cmake project itself, a simple call to add_subdirectory
will make the targets (libraries usually) available to your project and create a dependency. If the project is based on configure you can use the ExternalProject-extension.