From e7d8c44bcca1c40e8d7ba59785a18491bf217751 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Tue, 21 Mar 2017 13:35:51 +0100 Subject: [PATCH] Test on Travis CI This will allow us to test on macOS in the future. --- .travis.yml | 17 +++++++++++++++++ cmake/FindFreetype.cmake | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..4421316c4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: c++ +sudo: false +dist: trusty +addons: + apt: + packages: + - libfreetype6-dev + - libsdl2-dev +script: +- mkdir build +- cd build +- cmake .. +- make everything +env: + global: + - CFLAGS="-Wdeclaration-after-statement -Werror" + - CXXFLAGS="-Werror" diff --git a/cmake/FindFreetype.cmake b/cmake/FindFreetype.cmake index f679635cf..c62215446 100644 --- a/cmake/FindFreetype.cmake +++ b/cmake/FindFreetype.cmake @@ -2,7 +2,8 @@ find_package(PkgConfig QUIET) pkg_check_modules(PC_FREETYPE freetype2) set_extra_dirs(FREETYPE freetype) -find_path(FREETYPE_INCLUDEDIR freetype/config/ftheader.h +find_path(FREETYPE_INCLUDEDIR + NAMES config/ftheader.h freetype/config/ftheader.h PATH_SUFFIXES freetype2 HINTS ${PC_FREETYPE_INCLUDEDIR} ${PC_FREETYPE_INCLUDE_DIRS} PATHS ${EXTRA_FREETYPE_INCLUDEDIR}