From b16eb164ca14306d1236a47ce3d4b0ded5454981 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Mon, 12 Mar 2012 07:26:37 +0000 Subject: [PATCH] cleaneup \machine setting for MSVC, now only for 64bit static libs, only onwe for which needed. Added a comment showing why its needed git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1119 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/CMakeLists.txt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index 2fe01f5..0fdc595 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/CMakeLists.txt @@ -216,22 +216,14 @@ IF(WIN32) LIST(APPEND LIBS winmm) IF(BUILD_SHARED_LIBS) SET_TARGET_PROPERTIES(freeglut PROPERTIES COMPILE_FLAGS -DFREEGLUT_EXPORTS) - IF (CMAKE_CL_64) - # 64bit build - SET_TARGET_PROPERTIES(freeglut PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64") - ELSE() - # 32bit build - SET_TARGET_PROPERTIES(freeglut PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x86") - ENDIF() ENDIF() IF(BUILD_STATIC_LIBS) SET_TARGET_PROPERTIES(freeglut_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC) + # need to set machine:x64 for linker, at least for VC10, and + # doesn't hurt for older compilers: + # http://public.kitware.com/Bug/view.php?id=11240#c22768 IF (CMAKE_CL_64) - # 64bit build SET_TARGET_PROPERTIES(freeglut_static PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64") - ELSE() - # 32bit build - SET_TARGET_PROPERTIES(freeglut_static PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x86") ENDIF() ENDIF() ELSE()