From 6d85bc9467c166bf33228a71573a750f6826f6bd Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Sat, 26 Jan 2013 18:04:43 -0500 Subject: [PATCH] Determine what architecture the compiler is for msvc by how large our void pointers are. --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3c64aa..e710cd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,11 +16,14 @@ IF(MSVC) ENDIF() # !FIXME! Actually detect compiler architecture version.... - SET(MSVC_ARCHITECTURE_STRING x64) + IF( CMAKE_SIZEOF_VOID_P EQUAL 8 ) + SET(MSVC_ARCHITECTURE_STRING x64) + ELSE() + SET(MSVC_ARCHITECTURE_STRING x86) + ENDIF() SET(MSVC_LIB_DIR "${MSVC_INSTALL_PATH}/lib/${MSVC_ARCHITECTURE_STRING}/${MSVC_VERSION_STRING}") SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${MSVC_LIB_DIR}") - ENDIF(MSVC) ADD_SUBDIRECTORY(BPTCEncoder)