OSDN Git Service

98c5b32d39b01b59b90498bbcee44a41fa181094
[csp-qt/common_source_project-fm7.git] / source / build-cmake / cmake / single-build / simd-x86.cmake
1 # Set simd X86.
2 # (C) 2014 K.Ohta <whatisthis.sowhat@gmail.com>
3 # This is part of XM7/SDL, but license is apache 2.2,
4 # this part was written only me.
5
6 if((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") OR
7    (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86") OR
8    (CMAKE_SYSTEM_PROCESSOR STREQUAL "ia32") OR
9    (CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64"))
10  set(USE_SSE2 ON CACHE BOOL "Using SSE2 SIMD instructions, sometimes faster if enabled.")
11 # set(USE_MMX  ON CACHE BOOL "Using MMX SIMD instructions, sometimes faster if enabled.")
12 endif()
13
14
15 if(USE_SSE2)
16 # set(LOCAL_LIBS ${LOCAL_LIBS} common_scaler-sse2)
17  add_definitions(-DUSE_SSE2)
18 # add_subdirectory(sdl/vram/sse2)
19 # add_subdirectory(../../src/agar/common/scaler/sse2 agar/common/scaler/sse2)
20 endif()
21
22 #if(USE_SSE)
23 # add_definitions(-DUSE_SSE)
24 #endif()
25
26 #if(USE_MMX)
27 # add_definitions(-DUSE_MMX)
28 # set(LOCAL_LIBS ${LOCAL_LIBS} xm7_soundbuffer-mmx)
29 # add_subdirectory(sdl/soundbuffer/mmx)
30 #endif()
31