← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~qcumber-some/widelands/cmake_fail_on_sdl_accessories into lp:widelands

 

Jens Beyer (Qcumber-some) has proposed merging lp:~qcumber-some/widelands/cmake_fail_on_sdl_accessories into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #970264 in widelands: "Missing SDL_* libraries lead to rather useless messages"
  https://bugs.launchpad.net/widelands/+bug/970264

For more details, see:
https://code.launchpad.net/~qcumber-some/widelands/cmake_fail_on_sdl_accessories/+merge/100300

This change issues errors in cmake if one of the SDL_* accessory packages are missing.

I propose this change for inclusion after Build17 (as I could not test with missing all packages), but it should be pretty safe anyway.
-- 
https://code.launchpad.net/~qcumber-some/widelands/cmake_fail_on_sdl_accessories/+merge/100300
Your team Widelands Developers is requested to review the proposed merge of lp:~qcumber-some/widelands/cmake_fail_on_sdl_accessories into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2012-03-15 18:30:11 +0000
+++ CMakeLists.txt	2012-03-31 18:38:24 +0000
@@ -401,18 +401,33 @@
 
 find_package(SDL_image REQUIRED)
 include_directories(${SDLIMAGE_INCLUDE_DIR})
+if (NOT SDLIMAGE_FOUND)
+  message(FATAL_ERROR "Required package SDL_image not found, please install and re-run cmake")
+endif (NOT SDLIMAGE_FOUND)
 
 find_package(SDL_mixer REQUIRED)
 include_directories(${SDLMIXER_INCLUDE_DIR})
+if (NOT SDLMIXER_FOUND)
+  message(FATAL_ERROR "Required package SDL_mixer not found, please install and re-run cmake")
+endif (NOT SDLMIXER_FOUND)
 
 find_package(SDL_net REQUIRED)
 include_directories(${SDLNET_INCLUDE_DIR})
+if (NOT SDLNET_FOUND)
+  message(FATAL_ERROR "Required package SDL_net not found, please install and re-run cmake")
+endif (NOT SDLNET_FOUND)
 
 find_package(SDL_ttf REQUIRED)
 include_directories(${SDLTTF_INCLUDE_DIR})
+if (NOT SDLTTF_FOUND)
+  message(FATAL_ERROR "Required package SDL_ttf not found, please install and re-run cmake")
+endif (NOT SDLTTF_FOUND)
 
 find_package(SDL_gfx REQUIRED)
 include_directories(${SDLGFX_INCLUDE_DIR})
+if (NOT SDLGFX_FOUND)
+  message(FATAL_ERROR "Required package SDL_gfx not found, please install and re-run cmake")
+endif (NOT SDLGFX_FOUND)
 
 find_package(Lua51 REQUIRED)
 include_directories(${LUA_INCLUDE_DIR})


Follow ups