diff --git a/CMakeLists.txt b/CMakeLists.txt index 250e3cdc..e7163977 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,18 +44,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES Clang) add_definitions(-Wall) endif() -set(DISABLE_SSE ON) -check_c_source_compiles( - "#if !defined(__x86_64) && !defined(__i386__) \ - && !defined(_M_IX86) && !defined(_M_AMD64) - #error not x86 - #endif - int main(){return 0;}" - HAVE_X86) -if (HAVE_X86) - set(DISABLE_SSE OFF) -endif() - option(BUILD_SHARED_LIBS "Build shared library" ON) if(NOT BUILD_SHARED_LIBS) add_definitions(-DLIBDE265_STATIC_BUILD) diff --git a/libde265/CMakeLists.txt b/libde265/CMakeLists.txt index 86d49ffd..79fc81f9 100644 --- a/libde265/CMakeLists.txt +++ b/libde265/CMakeLists.txt @@ -94,7 +94,15 @@ add_definitions(-DLIBDE265_EXPORTS) add_subdirectory (encoder) -if(NOT DISABLE_SSE) +check_c_source_compiles( + "#if !defined(__x86_64) && !defined(__i386__) \ + && !defined(_M_IX86) && !defined(_M_AMD64) + #error not x86 + #endif + int main(){return 0;}" + HAVE_X86) + +if(HAVE_X86) if (MSVC) set(SUPPORTS_SSE2 1) set(SUPPORTS_SSSE3 1)