From 34dcd0657fc3b5c4750e35872518b78b363ddea4 Mon Sep 17 00:00:00 2001 From: Gregory A Lundberg Date: Sun, 16 Oct 2016 03:36:57 -0500 Subject: [PATCH] Test for Travis and only require SDL 2.0.2 --- CMakeLists.txt | 7 +++++-- SConstruct | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 430b7ca1f8f9..ba349c3664c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,9 +57,12 @@ option(ENABLE_LIBPNG "Enable support for writing png files (screenshots, images) option(ENABLE_LIBINTL "Enable using libintl for translations instead of Boost.Locale library (not recommended)" OFF) option(ENABLE_HISTORY "Enable using GNU history for history in lua console" ON) +if(DEFINED ENV{TRAVIS}) + find_package(SDL2 2.0.2 REQUIRED) +else() + find_package(SDL2 2.0.4 REQUIRED) +endif() -find_package(SDL2 2.0.4 REQUIRED) - find_package(Boost 1.36 REQUIRED COMPONENTS iostreams program_options regex system thread) find_package(Boost 1.40 REQUIRED COMPONENTS random) diff --git a/SConstruct b/SConstruct index 53b746333a57..a9702dfcb403 100755 --- a/SConstruct +++ b/SConstruct @@ -178,7 +178,10 @@ if env['distcc']: if env['ccache']: env.Tool('ccache') -SDL2_version = '2.0.4'; +if 'TRAVIS' in os.environ: + SDL2_version = '2.0.2'; +else: + SDL2_version = '2.0.4'; Help("""Arguments may be a mixture of switches and targets in any order.