diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c7d057d6..b508ff256 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,22 +252,13 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(USE_FAST_MATH ON CACHE BOOL "Enable -ffast-math for GCC") endif() - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*) + if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*|x86_64*) set(X86_64 1) endif() - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64*) - set(X86_64 1) - endif() - - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686*) + + if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686*|i386*|x86*) set(X86 1) - endif() - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i386*) - set(X86 1) - endif() - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86*) - set(X86 1) - endif() + endif() if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc*) set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC") @@ -608,14 +599,14 @@ if (WITH_QT) #if (NOT WIN32) if (WITH_QT_OPENGL) - if (QT_QTOPENGL_FOUND AND OPENGL_FOUND) - set(HAVE_QT_OPENGL 1) - add_definitions(-DHAVE_QT_OPENGL) - #link_directories("${OPENGL_LIBRARIES}") - set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${OPENGL_LIBRARIES}) - endif() - endif() - #endif() + if (QT_QTOPENGL_FOUND AND OPENGL_FOUND) + set(HAVE_QT_OPENGL 1) + add_definitions(-DHAVE_QT_OPENGL) + #link_directories("${OPENGL_LIBRARIES}") + set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${OPENGL_LIBRARIES}) + endif() + endif() + #endif() endif() endif() @@ -775,12 +766,12 @@ endif() ############################### VideoInput ################################ if (WIN32 AND WITH_VIDEOINPUT) - if(CMAKE_CXX_COMPILER MATCHES "dw2") - else() - if(NOT MINGW64) - set(HAVE_VIDEOINPUT 1) - endif() - endif() + if(CMAKE_CXX_COMPILER MATCHES "dw2") + else() + if(NOT MINGW64) + set(HAVE_VIDEOINPUT 1) + endif() + endif() endif() ############################### OpenNI ################################