CMakeLists.txt
branchphysfslayer
changeset 8019 b216953c2617
parent 7951 c64c0b413ff7
parent 7994 706218709157
child 8022 10b3b93c1f56
--- a/CMakeLists.txt	Tue Nov 13 23:16:21 2012 +0400
+++ b/CMakeLists.txt	Tue Nov 13 23:21:46 2012 +0400
@@ -12,7 +12,7 @@
 
 
 #detect Mercurial revision (if present)
-set(version_suffix "") #UNSET THIS VARIABLE AT RELEASE TIME
+set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME
 set(HGCHANGED "")
 IF(version_suffix MATCHES "-dev")
     set(HW_DEV true)
@@ -43,8 +43,8 @@
 #versioning
 set(CPACK_PACKAGE_VERSION_MAJOR 0)
 set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 18${version_suffix})
-set(HEDGEWARS_PROTO_VER 43)
+set(CPACK_PACKAGE_VERSION_PATCH 19${version_suffix})
+set(HEDGEWARS_PROTO_VER 44)
 set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 
 
@@ -55,10 +55,9 @@
 
 option(BUILD_ENGINE_LIBRARY "Enable hwengine library [default: off]" OFF)
 option(ANDROID "Enable Android build [default: off]" OFF)
-
 option(NOAUTOUPDATE "Disable OS X Sparkle update checking" OFF)
 option(CROSSAPPLE "Enable OSX when not on OSX [default: off]" OFF)
-
+option(MINIMAL_FLAGS "Respect system flags as much as possible [default: off]" OFF)
 
 #bundle .app setup
 if(APPLE OR CROSSAPPLE)
@@ -158,14 +157,21 @@
     set (CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Choose the build type, options are: Debug Release." FORCE)
 endif (CMAKE_BUILD_TYPE)
 
-
-#set default flags values for all projects
-set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}")
-set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
-set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
-set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
-set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+#set default flags values for all projects (unless MINIMAL_FLAGS is true)
+if(NOT MINIMAL_FLAGS)
+    set(CMAKE_C_FLAGS "-pipe")
+    set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer")
+    set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG")
+    set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
+    set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
+    set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+else()
+    #CMake adds a lot of additional configuration flags, so let's clear them up
+    set(CMAKE_C_FLAGS_RELEASE "")
+    set(CMAKE_C_FLAGS_DEBUG "-Wall -DDEBUG")
+    set(CMAKE_CXX_FLAGS_RELEASE "")
+    set(CMAKE_CXX_FLAGS_DEBUG "-Wall -DDEBUG")
+endif()
 
 #parse additional parameters
 if(FPFLAGS OR GHFLAGS)