Skip to content

Instantly share code, notes, and snippets.

@naortega
Created July 4, 2015 12:49
Show Gist options
  • Save naortega/81d6f5a98c1b58b15980 to your computer and use it in GitHub Desktop.
Save naortega/81d6f5a98c1b58b15980 to your computer and use it in GitHub Desktop.
CMake Allegro (from apt) on Debian Stretch
cmake_minimum_required(VERSION 2.6)
project(Game)
# Set the name of the final binary file
set(bin game)
# Tell CMake where to find the source files (and which to use)
# NOTICE: I am assuming you are like me and you put your source code
# in a src/ directory and your CMakeLists.txt file in the root directory
# of your project.
file(GLOB srcs
src/*.h
src/*.cpp
)
# Create the executable
add_executable(${bin} ${srcs})
# Link the allegro library
include_directories(/usr/include/allegro/)
find_library(alleg liballegro.so)
target_link_libraries(${bin} ${alleg})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment