Applied patch for IPP linking under MinGW (thanks to Philippe FOUBERT) #1906

This commit is contained in:
Andrey Kamaev 2012-05-14 14:56:17 +00:00
parent 26fb7603c0
commit 9275adff81

View File

@ -234,7 +234,6 @@ endfunction()
NO_CMAKE_PATH)
if(IPP_H_PATH)
set(IPP_FOUND 1)
# traverse up to IPPROOT level
@ -251,14 +250,10 @@ endfunction()
# set IPP INCLUDE, LIB dirs and library names
set_ipp_variables(${IPP_LATEST_VERSION_STR})
endif()
if(IPP_FOUND)
return()
endif()
if(NOT IPP_FOUND)
# reset var from previous search
set(IPP_H_PATH)
@ -304,6 +299,7 @@ endfunction()
endforeach()
endif()
endforeach()
endif()
if(IPP_FOUND)
# set IPP INCLUDE, LIB dirs and library names
@ -320,3 +316,21 @@ endfunction()
NO_DEFAULT_PATH
NO_CMAKE_PATH)
endif()
if(WIN32 AND MINGW AND NOT IPP_LATEST_VERSION_MAJOR LESS 7)
# Since IPP built with Microsoft compiler and /GS option
# ======================================================
# From Windows SDK 7.1
# (usually in "C:\Program Files\Microsoft Visual Studio 10.0\VC\lib"),
# to avoid undefined reference to __security_cookie and _chkstk:
set(MSV_RUNTMCHK "RunTmChk")
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_RUNTMCHK}${IPP_LIB_SUFFIX})
# To avoid undefined reference to _alldiv and _chkstk
# ===================================================
# NB: it may require a recompilation of w32api (after having modified
# the file ntdll.def) to export the required functions
# See http://code.opencv.org/issues/1906 for additional details
set(MSV_NTDLL "ntdll")
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX})
endif()