# SUBDIRECTORIES:
# Save libs and executables in the same place
-set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE PATH "Output directory for libraries" )
-set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH "Output directory for applications" )
+set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib" CACHE PATH "Output directory for libraries" )
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin" CACHE PATH "Output directory for applications" )
if(ANDROID OR WIN32)
set(OPENCV_DOC_INSTALL_PATH doc)
set(ENABLE_PROFILING OFF CACHE BOOL "Enable profiling in the GCC compiler (Add flags: -g -pg)")
set(USE_OMIT_FRAME_POINTER ON CACHE BOOL "Enable -fomit-frame-pointer for GCC")
- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*|x86_64*)
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64.*|x86_64.*)
set(X86_64 1)
endif()
- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686*|i386*|x86*)
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686.*|i386.*|x86.*)
set(X86 1)
endif()
- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc*)
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc.*)
set(ENABLE_POWERPC ON CACHE BOOL "Enable PowerPC for GCC")
endif ()
if(X86 OR X86_64)
# enable everything, since the available set of instructions is checked at runtime
- IF ("${CMAKE_GCC_REGEX_VERSION}" VERSION_GREATER 4.6.-1)
+ IF ("${CMAKE_GCC_REGEX_VERSION}" VERSION_GREATER 4.5)
SET(_USE_FAST_MATH OFF)
ELSE()
SET(_USE_FAST_MATH ON)
set(HAVE_CAMV4L2 FALSE)
endif()
- if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD" AND NOT ANDROID)
- set(OPENCV_LINKER_LIBS m pthread)
- elseif(ANDROID)
+ if(ANDROID)
set(OPENCV_LINKER_LIBS dl m log)
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
+ set(OPENCV_LINKER_LIBS m pthread)
else()
set(OPENCV_LINKER_LIBS dl m pthread rt)
endif()
set(BUILD_NEW_PYTHON_SUPPORT OFF)
endif()
endif()
+
if(ANDROID)
set(BUILD_NEW_PYTHON_SUPPORT OFF)
endif()
set(PYTHON_PACKAGES_PATH "${PYTHON_PATH}/Lib/site-packages")
endif()
-IF ("${PYTHON_VERSION_MAJOR_MINOR}" VERSION_GREATER 2.5.-1)
+IF ("${PYTHON_VERSION_MAJOR_MINOR}" VERSION_GREATER 2.4)
SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} -B)
ENDIF()
endif()
- if (ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND (ANT_VERSION VERSION_GREATER 1.7.-1))
+ if (ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND (ANT_VERSION VERSION_GREATER 1.7))
SET(CAN_BUILD_ANDROID_PROJECTS TRUE)
else()
SET(CAN_BUILD_ANDROID_PROJECTS FALSE)
find_package(Qt4)
if (QT4_FOUND)
set(HAVE_QT 1)
- add_definitions(-DHAVE_QT)#We need to define te macro this way, using cvconfig.h.cmake does not work
-
+ add_definitions(-DHAVE_QT)#We need to define te macro this way, using cvconfig.h.cmake does not work
find_package (OpenGL QUIET)
-
- #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})
+ #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()
- #endif()
-
+ #endif()
endif()
endif()
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wall")
# The -Wno-long-long is required in 64bit systems when including sytem headers.
- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64*)
- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-long-long")
- endif()
- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*)
+ if(X86_64)
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-long-long")
endif()
set(HAVE_GCC42_OR_NEWER 1)
endif()
- if(HAVE_GCC43_OR_NEWER OR APPLE)
+ if(HAVE_GCC42_OR_NEWER OR APPLE)
if(ENABLE_SSSE3)
set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -mssse3")
endif()
- if(HAVE_GCC42_OR_NEWER)
+ if(HAVE_GCC43_OR_NEWER)
if(ENABLE_SSE41)
set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -msse4.1")
endif()