changeset 26:99b833843ba9

fix MSVC 64bit builds
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Nov 2016 17:07:15 +0100
parents 902e6c52e154
children 507b5776ebad
files Resources/CMake/OrthancStone.cmake Resources/CMake/PixmanConfiguration.cmake
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/OrthancStone.cmake	Wed Nov 23 15:50:31 2016 +0100
+++ b/Resources/CMake/OrthancStone.cmake	Wed Nov 23 17:07:15 2016 +0100
@@ -55,6 +55,11 @@
 include(${CMAKE_CURRENT_LIST_DIR}/CairoConfiguration.cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/PixmanConfiguration.cmake)
 
+if (MSVC)
+  # Remove some warnings on Visual Studio 2015
+  add_definitions(-D_SCL_SECURE_NO_WARNINGS=1) 
+endif()
+
 
 #####################################################################
 ## Configure optional third-party components
--- a/Resources/CMake/PixmanConfiguration.cmake	Wed Nov 23 15:50:31 2016 +0100
+++ b/Resources/CMake/PixmanConfiguration.cmake	Wed Nov 23 17:07:15 2016 +0100
@@ -102,8 +102,15 @@
       ${PIXMAN_SOURCES_DIR}/pixman/pixman-sse2.c
       ${PIXMAN_SOURCES_DIR}/pixman/pixman-ssse3.c
       )
+
+    if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+      # Only enable MMX on Windows 32
+      add_definitions(
+        -DUSE_X86_MMX=1
+        )
+    endif()
+
     add_definitions(
-      -DUSE_X86_MMX=1
       -DUSE_SSE2=1
       -DUSE_SSSE3=1
       )