ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 98c95508efdd56227b10a34e63a4c9b7216b91ab
parent 614bb84bd2472e5c7f0a2cf881f0269995c0dcc4
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Sun, 11 Oct 2015 17:41:21 +0200

Made CMakeList more modular, and linking strtonum conditionally

Diffstat:
MCMakeLists.txt | 18+++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -1,11 +1,23 @@ cmake_minimum_required (VERSION 2.6) + project (ansilove C) +include(CheckFunctionExists) +include_directories(/usr/local/include /usr/pkg/include) + +check_function_exists(strtonum HAVE_STRTONUM) + find_library(LIB_GD NAMES gd REQUIRED) -include_directories(/usr/local/include) -add_definitions(-Wall -Wextra -std=c99 -pedantic) +set (SRC src/main.c src/albinfonts.c src/ansilove.c src/explode.c src/filesize.c src/strtolower.c src/substr.c) -add_executable(ansilove src/main.c src/albinfonts.c src/ansilove.c src/explode.c src/filesize.c src/strtolower.c src/substr.c) +if(NOT HAVE_STRTONUM) + set (SRC ${SRC} compat/strtonum.c) +endif() + +add_definitions(-Wall -Wextra -std=c99 -pedantic) +add_executable(ansilove ${SRC}) target_link_libraries(ansilove ${LIB_GD} m) + +install(TARGETS ansilove DESTINATION bin)