Permalink
Browse files

Include the git version (from tags) as a preprocessor macro.

  • Loading branch information...
1 parent ab8df46 commit 3a27f2437aa1f21fab87e7e77552231d76db787d @sethk committed May 4, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 Makefiles/Base.gmake
View
@@ -54,6 +54,9 @@ PLATFORM_PATH = $(DEVELOPER_PATH)/Platforms/$(PLATFORM).platform
SDK_PATH = $(PLATFORM_PATH)/Developer/SDKs/$(SDK_NAME)
CFLAGS+= -arch $(ARCH) -isysroot $(SDK_PATH)
+VERSION = $(shell git describe --tags --dirty --always --abbrev=6)
+DEFINES+= VERSION="$(VERSION)"
+
PREFIX_HEADER?= $(PRODUCT_NAME)-Prefix.pch
PRECOMP_HEADER = $(notdir $(addsuffix $(PREFIX_HEADER),.gch))
$(SOURCES): $(BUILD_PATH)/$(PRECOMP_HEADER)

0 comments on commit 3a27f24

Please sign in to comment.