From 668ad6e5597a10f704f5e1b19b998f646b73f198 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 2 Jun 2019 01:32:36 -0600 Subject: [PATCH] CMake: Don't build convert_srgb_sse2.cxx separately on AMD64 This is unnecessary on AMD64, where SSE2 is builtin and the file in question can be composited just like everything else. --- panda/src/pnmimage/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panda/src/pnmimage/CMakeLists.txt b/panda/src/pnmimage/CMakeLists.txt index 5f66c24270..9c3f6fccbd 100644 --- a/panda/src/pnmimage/CMakeLists.txt +++ b/panda/src/pnmimage/CMakeLists.txt @@ -32,7 +32,8 @@ set(P3PNMIMAGE_IGATEEXT pfmFile_ext.h ) -if(HAVE_SSE2) +if(HAVE_SSE2 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR MATCHES "86") + # It's only necessary to do this on 32-bit x86; 64-bit makes SSE2 builtin. set_source_files_properties(convert_srgb_sse2.cxx PROPERTIES SKIP_COMPOSITING YES COMPILE_FLAGS -msse2)