Fix errors in usages of try_compile
* There's no OPENCV_BINARY_DIR variable; * No need to append CMakeFiles/CMakeTmp, as CMake does it for you; * Output variables are unused; * Wrong usage of CMAKE_FLAGS; * Small quoting and style issues.
This commit is contained in:
parent
20bf1aa244
commit
a9e9ce859e
@ -26,8 +26,8 @@ else()
|
|||||||
set(HAVE_MSVC2012 TRUE)
|
set(HAVE_MSVC2012 TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
TRY_COMPILE(HAVE_WINRT_SDK
|
try_compile(HAVE_WINRT_SDK
|
||||||
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
"${OpenCV_BINARY_DIR}"
|
||||||
"${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp")
|
"${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp")
|
||||||
|
|
||||||
if (ENABLE_WINRT_MODE AND HAVE_WINRT_SDK AND HAVE_MSVC2012 AND HAVE_MSPDK)
|
if (ENABLE_WINRT_MODE AND HAVE_WINRT_SDK AND HAVE_MSVC2012 AND HAVE_MSPDK)
|
||||||
|
@ -5,12 +5,11 @@
|
|||||||
#--- Win32 UI ---
|
#--- Win32 UI ---
|
||||||
ocv_clear_vars(HAVE_WIN32UI)
|
ocv_clear_vars(HAVE_WIN32UI)
|
||||||
if(WITH_WIN32UI)
|
if(WITH_WIN32UI)
|
||||||
TRY_COMPILE(HAVE_WIN32UI
|
try_compile(HAVE_WIN32UI
|
||||||
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
"${OpenCV_BINARY_DIR}"
|
||||||
"${OpenCV_SOURCE_DIR}/cmake/checks/win32uitest.cpp"
|
"${OpenCV_SOURCE_DIR}/cmake/checks/win32uitest.cpp"
|
||||||
CMAKE_FLAGS "\"user32.lib\" \"gdi32.lib\""
|
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=user32;gdi32")
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
endif()
|
||||||
endif(WITH_WIN32UI)
|
|
||||||
|
|
||||||
# --- QT4 ---
|
# --- QT4 ---
|
||||||
ocv_clear_vars(HAVE_QT HAVE_QT5)
|
ocv_clear_vars(HAVE_QT HAVE_QT5)
|
||||||
|
@ -3,13 +3,12 @@
|
|||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
ocv_clear_vars(HAVE_VFW)
|
ocv_clear_vars(HAVE_VFW)
|
||||||
if (WITH_VFW)
|
if(WITH_VFW)
|
||||||
TRY_COMPILE(HAVE_VFW
|
try_compile(HAVE_VFW
|
||||||
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
"${OpenCV_BINARY_DIR}"
|
||||||
"${OpenCV_SOURCE_DIR}/cmake/checks/vfwtest.cpp"
|
"${OpenCV_SOURCE_DIR}/cmake/checks/vfwtest.cpp"
|
||||||
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32"
|
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32")
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
endif(WITH_VFW)
|
||||||
endif(WITH_VFW)
|
|
||||||
|
|
||||||
# --- GStreamer ---
|
# --- GStreamer ---
|
||||||
ocv_clear_vars(HAVE_GSTREAMER)
|
ocv_clear_vars(HAVE_GSTREAMER)
|
||||||
|
@ -77,7 +77,7 @@ MACRO(ocv_check_compiler_flag LANG FLAG RESULT)
|
|||||||
if(_fname)
|
if(_fname)
|
||||||
MESSAGE(STATUS "Performing Test ${RESULT}")
|
MESSAGE(STATUS "Performing Test ${RESULT}")
|
||||||
TRY_COMPILE(${RESULT}
|
TRY_COMPILE(${RESULT}
|
||||||
${CMAKE_BINARY_DIR}
|
"${CMAKE_BINARY_DIR}"
|
||||||
"${_fname}"
|
"${_fname}"
|
||||||
COMPILE_DEFINITIONS "${FLAG}"
|
COMPILE_DEFINITIONS "${FLAG}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user