From 6ae5258b3e3aa974924b7b1da7ed36d0e7bf6d92 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Wed, 30 Jul 2014 03:11:37 +0200 Subject: [PATCH] AdAdded check for SDL2 to CMake --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 998cd7673..824db540a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,8 +66,14 @@ FIND_PACKAGE(Boost REQUIRED) INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIR}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) -#FIND_PACKAGE(SDL REQUIRED) -INCLUDE_DIRECTORIES("src/SDL2/") +INCLUDE(FindPkgConfig) +PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2) +INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS}) +LINK_LIBRARIES(supertux2 ${SDL2_LIBRARIES}) + +PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0) +INCLUDE_DIRECTORIES(${SDL2IMAGE_INCLUDE_DIRS}) +LINK_LIBRARIES(supertux2 ${SDL2IMAGE_LIBRARIES}) SET(HAVE_SDL TRUE) #FIND_PACKAGE(SDL_image REQUIRED) -- 2.11.0