+# This would suppress annoying warnings on cmake-2.6, but we can't use it
+# with 2.4, so... DUH!
+# cmake_policy(SET CMP0003 OLD) # suppress linker warnings
+
+if(STATICWIN)
+ set(CMAKE_BUILD_TYPE Release)
+endif(STATICWIN)
+
+# Enable various flags on gcc
+include(CheckCXXCompilerFlag)
+check_cxx_compiler_flag(-Wall Wall)
+if(Wall)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+endif(Wall)
+check_cxx_compiler_flag(-Wextra Wextra)
+if(Wextra)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
+endif(Wextra)
+check_cxx_compiler_flag(-ansi ansi)
+if(ansi)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi")
+endif(ansi)
+
+set(QT_MIN_VERSION "4.3.0")