another attempt to fix IPP detection on x64 (ticket #1294)
authorVadim Pisarevsky <no@email>
Thu, 11 Aug 2011 22:18:51 +0000 (22:18 +0000)
committerVadim Pisarevsky <no@email>
Thu, 11 Aug 2011 22:18:51 +0000 (22:18 +0000)
OpenCVFindIPP.cmake

index 1916119..69f7f2e 100644 (file)
@@ -43,6 +43,14 @@ set(IPPCV      "cv")   # computer vision
 set(IPPVM      "vm")   # vector math\r
 \r
 \r
+set(IPP_X64 0)\r
+if (CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)\r
+    set(IPP_X64 1)\r
+endif()\r
+if (CMAKE_CL_64)\r
+    set(IPP_X64 1)\r
+endif()\r
+\r
 # ------------------------------------------------------------------------\r
 # This function detect IPP version by analyzing ippversion.h file\r
 # Note, ippversion.h file was inroduced since IPP 5.3\r
@@ -96,11 +104,7 @@ function(set_ipp_old_libraries)
     set(IPPCV      "cv")       # computer vision\r
     set(IPPVM      "vm")       # vector math\r
     \r
-    if (CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)\r
-        set(IPP_ARCH "em64t")\r
-    endif()\r
-    \r
-    if (CMAKE_CL_64)\r
+    if (IPP_X64)\r
         set(IPP_ARCH "em64t")\r
     endif()\r
 \r
@@ -171,7 +175,7 @@ function(set_ipp_variables _LATEST_VERSION)
         set(IPP_INCLUDE_DIRS ${IPP_ROOT_DIR}/include PARENT_SCOPE)\r
         set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib     PARENT_SCOPE)\r
 \r
-        if (CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)\r
+        if (IPP_X64)\r
             if(NOT EXISTS ${IPP_ROOT_DIR}/../em64t)\r
                 message(SEND_ERROR "IPP EM64T libraries not found")\r
             endif()\r
@@ -192,7 +196,7 @@ function(set_ipp_variables _LATEST_VERSION)
         # set INCLUDE and LIB folders\r
         set(IPP_INCLUDE_DIRS ${IPP_ROOT_DIR}/include PARENT_SCOPE)\r
 \r
-        if (CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)\r
+        if (IPP_X64)\r
             if(NOT EXISTS ${IPP_ROOT_DIR}/lib/intel64)\r
                 message(SEND_ERROR "IPP EM64T libraries not found")\r
             endif()\r