Created
July 4, 2015 12:49
-
-
Save naortega/81d6f5a98c1b58b15980 to your computer and use it in GitHub Desktop.
CMake Allegro (from apt) on Debian Stretch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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