gameServer/CMakeLists.txt
changeset 8671 a9957b7797f3
parent 8316 89232b2fa1d6
child 8686 d303da4568b7
--- a/gameServer/CMakeLists.txt	Wed Mar 06 09:42:20 2013 -0500
+++ b/gameServer/CMakeLists.txt	Wed Mar 06 16:40:56 2013 +0100
@@ -1,4 +1,8 @@
 
+find_package(GHC REQUIRED)
+if(NOT ${GHC_FOUND})
+    message(FATAL_ERROR "Missing Glasgow Haskell Compiler! Rerun cmake with -DNOSERVER=on to disable hosting LAN games")
+endif()
 
 set(hwserver_sources
     OfficialServer/DBInteraction.hs
@@ -34,7 +38,7 @@
     ${haskell_flags})
 
 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
-        COMMAND "${ghc_executable}"
+        COMMAND "${GHC_EXECUTABLE}"
         ARGS ${ghc_flags}
         MAIN_DEPENDENCY ${hwserv_main}
         DEPENDS ${hwserver_sources}