Commit 51a91ce8c6d8129788841975e4ff213bc2953bb4

Vicent Martí 2013-04-29T09:09:27

Merge pull request #1513 from ethomson/cmake cmake 2.6 parser bug workaround

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1831c87..9f6b06b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -293,7 +293,7 @@ TARGET_OS_LIBRARIES(git2)
 
 # Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240)
 # Win64+MSVC+static libs = linker error
-IF(MSVC AND NOT BUILD_SHARED_LIBS AND (${CMAKE_SIZEOF_VOID_P} MATCHES "8") )
+IF(MSVC AND GIT_ARCH_64 AND NOT BUILD_SHARED_LIBS)
   SET_TARGET_PROPERTIES(git2 PROPERTIES STATIC_LIBRARY_FLAGS "/MACHINE:x64")
 ENDIF()