minor cmake corrections
authorAndrey Kamaev <no@email>
Tue, 12 Jul 2011 07:40:29 +0000 (07:40 +0000)
committerAndrey Kamaev <no@email>
Tue, 12 Jul 2011 07:40:29 +0000 (07:40 +0000)
CMakeLists.txt
modules/java/rst_parser.py

index fc50187..9023fa1 100644 (file)
@@ -113,8 +113,8 @@ endif()
 
 # 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)
@@ -349,19 +349,19 @@ if(CMAKE_COMPILER_IS_GNUCXX)
     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)
@@ -577,10 +577,10 @@ if(UNIX)
             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()
@@ -628,6 +628,7 @@ if (WIN32)
         set(BUILD_NEW_PYTHON_SUPPORT OFF)
     endif()
 endif()
+
 if(ANDROID)
     set(BUILD_NEW_PYTHON_SUPPORT OFF)
 endif()
@@ -663,7 +664,7 @@ if(CMAKE_HOST_WIN32)
     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()
 
@@ -740,7 +741,7 @@ if (BUILD_JAVA_SUPPORT)
     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)
@@ -764,22 +765,19 @@ if (WITH_QT)
     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()
 
@@ -1070,10 +1068,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
     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()
 
@@ -1119,11 +1114,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
             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()
index f6c8740..4e519af 100644 (file)
@@ -156,7 +156,6 @@ class RstParser(object):
                     skip_code_lines = False
                     
             if ll.startswith(".. code-block::") or ll.startswith(".. image::"):
-            #or ll.startswith(".. math::") or ll.startswith(".. image::"):
                 skip_code_lines = True
                 continue