install shaders only when needed, find clang only when needed, fix building on windows, better cmake boolean vars webgl
authorkoda
Wed, 02 Jan 2013 11:11:49 +0100
branchwebgl
changeset 8340 46a9fde631f4
parent 8338 cfad3738132c
child 8444 75db7bb8dce8
install shaders only when needed, find clang only when needed, fix building on windows, better cmake boolean vars
CMakeLists.txt
hedgewars/hwengine.pas
share/hedgewars/Data/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)
--- 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}
--- 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})