# HG changeset patch
# User koda
# Date 1357121509 -3600
# Node ID 46a9fde631f4004b94430bac85eb96391ee0874a
# Parent  cfad3738132c0cea3bc3c40cfec0698e5f0a0ad7
install shaders only when needed, find clang only when needed, fix building on windows, better cmake boolean vars

diff -r cfad3738132c -r 46a9fde631f4 CMakeLists.txt
--- a/CMakeLists.txt	Sun Dec 30 09:48:52 2012 -0500
+++ b/CMakeLists.txt	Wed Jan 02 11:11:49 2013 +0100
@@ -33,7 +33,7 @@
 
 
 #detect Mercurial revision (if present)
-if(NOT NOREVISION)
+if(NOT ${NOREVISION})
     set(default_build_type "DEBUG")
     set(version_suffix "-development_version")
     set(HW_DEV true)
@@ -56,11 +56,11 @@
         endif()
         set(version_suffix "-${revision_number}${HGCHANGED}")
     endif()
-else(NOT NOREVISION)
+else(NOT ${NOREVISION})
     set(default_build_type "RELEASE")
     set(HWDEV false)
     message(STATUS "Building distributable version")
-endif(NOT NOREVISION)
+endif(NOT ${NOREVISION})
 
 
 #versioning
@@ -72,15 +72,15 @@
 set(required_clang_version 3.0)
 
 
-# Check LLVM/Clang version
-find_package(Clang)
-if (NOPASCAL)
+if (${NOPASCAL})
+    find_package(Clang)
+    # Check LLVM/Clang version
 	if (CLANG_VERSION VERSION_LESS required_clang_version)
 		message(FATAL_ERROR "LLVM/Clang compiler required version is ${REQUIRED_CLANG_VERSION} but version ${CLANG_VERSION} was found!")
 	else()
 		message(STATUS "Found CLANG: ${CLANG_EXECUTABLE} (version ${CLANG_VERSION})")
 	endif()
-endif(NOPASCAL)
+endif(${NOPASCAL})
 
 
 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
diff -r cfad3738132c -r 46a9fde631f4 hedgewars/hwengine.pas
--- a/hedgewars/hwengine.pas	Sun Dec 30 09:48:52 2012 -0500
+++ b/hedgewars/hwengine.pas	Wed Jan 02 11:11:49 2013 +0100
@@ -19,7 +19,7 @@
 {$INCLUDE "options.inc"}
 
 {$IFDEF WIN32}
-{$R hwengine.rc}
+{$R res/hwengine.rc}
 {$ENDIF}
 
 {$IFDEF HWLIBRARY}
diff -r cfad3738132c -r 46a9fde631f4 share/hedgewars/Data/CMakeLists.txt
--- a/share/hedgewars/Data/CMakeLists.txt	Sun Dec 30 09:48:52 2012 -0500
+++ b/share/hedgewars/Data/CMakeLists.txt	Wed Jan 02 11:11:49 2013 +0100
@@ -1,3 +1,7 @@
-foreach(dir "Fonts" "Forts" "Graphics" "Locale" "Maps" "Music" "Shaders" "Sounds" "Themes" "Missions" "Names" "misc" "Scripts")
-  add_subdirectory(${dir})
+foreach(dir "Fonts" "Forts" "Graphics" "Locale" "Maps" "Music" "Sounds" "Themes" "Missions" "Names" "misc" "Scripts")
+    add_subdirectory(${dir})
 endforeach(dir)
+
+if(${GL2})
+    add_subdirectory(Shaders)
+endif(${GL2})