mirror of
https://github.com/opencv/opencv.git
synced 2025-06-13 21:23:31 +08:00
Merge pull request #26985 from xi-guo-0:fix-qnx7.0-build
fix: qnx7.0 build
This commit is contained in:
commit
b65fd3b51c
@ -720,6 +720,7 @@ if(UNIX OR MINGW)
|
|||||||
endif()
|
endif()
|
||||||
include(CheckFunctionExists)
|
include(CheckFunctionExists)
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
|
include(CheckLibraryExists)
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
|
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
@ -731,7 +732,11 @@ if(UNIX OR MINGW)
|
|||||||
elseif(EMSCRIPTEN)
|
elseif(EMSCRIPTEN)
|
||||||
# no need to link to system libs with emscripten
|
# no need to link to system libs with emscripten
|
||||||
elseif(QNXNTO)
|
elseif(QNXNTO)
|
||||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m regex)
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
|
||||||
|
CHECK_LIBRARY_EXISTS(regex regexec "" HAVE_REGEX_LIBRARY)
|
||||||
|
if(HAVE_REGEX_LIBRARY)
|
||||||
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} regex)
|
||||||
|
endif()
|
||||||
elseif(MINGW)
|
elseif(MINGW)
|
||||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} pthread)
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} pthread)
|
||||||
else()
|
else()
|
||||||
|
@ -49,5 +49,9 @@ if(OPENCV_DISABLE_THREAD_SUPPORT)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "QNX")
|
if(CMAKE_SYSTEM_NAME STREQUAL "QNX")
|
||||||
ocv_target_link_libraries(${the_module} PUBLIC regex)
|
include(CheckLibraryExists)
|
||||||
endif()
|
CHECK_LIBRARY_EXISTS(regex regexec "" HAVE_REGEX_LIBRARY)
|
||||||
|
if(HAVE_REGEX_LIBRARY)
|
||||||
|
ocv_target_link_libraries(${the_module} PUBLIC regex)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user