From d6f61233cec47fb4f8c730879532597af9f61be5 Mon Sep 17 00:00:00 2001 From: Karl Goetz Date: Mon, 15 Dec 2014 18:29:57 +1100 Subject: [PATCH] Change test for GIT_VERSION_CMD an xcode check Following the work I did on GH ' Remove special casing on GIT_VERSION_CMD #33 ' I've done more experiements and test rebuilds. I've found that the test should actually be to find out if we are working with Xcode specifically as using the gnu build chain is working correctly with the code in the 'else' clause - the codepath i tested before doing my original changes - but doesn't work using the special 'apple' version. This change should mean both methods of building work correctly. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e45ad3d..899ea733 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -242,7 +242,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW) ENDIF() ENDIF() - IF(APPLE) + IF(CMAKE_GENERATOR STREQUAL Xcode) SET(GIT_VERSION_CMD "-DGITVERSION='\\\\'${GIT_LIVE_REV_CMD}\\\\''") ELSE() SET(GIT_VERSION_CMD "-DGITVERSION='\\\"${GIT_LIVE_REV_CMD}\\\"'")