cmake(plugins): build without opencv_*.so on OSX
This commit is contained in:
parent
54d80d9168
commit
a7c1838c69
@ -78,8 +78,10 @@ function(ocv_create_plugin module default_name dependency_target dependency_targ
|
|||||||
set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES PREFIX "${OPENCV_PLUGIN_MODULE_PREFIX}")
|
set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES PREFIX "${OPENCV_PLUGIN_MODULE_PREFIX}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Hack for Windows only, Linux/MacOS uses global symbol table (without exact .so binding)
|
if(APPLE)
|
||||||
if(WIN32)
|
set_target_properties(${OPENCV_PLUGIN_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
||||||
|
elseif(WIN32)
|
||||||
|
# Hack for Windows only, Linux/MacOS uses global symbol table (without exact .so binding)
|
||||||
find_package(OpenCV REQUIRED ${module} ${OPENCV_PLUGIN_DEPS})
|
find_package(OpenCV REQUIRED ${module} ${OPENCV_PLUGIN_DEPS})
|
||||||
target_link_libraries(${OPENCV_PLUGIN_NAME} PRIVATE ${OpenCV_LIBRARIES})
|
target_link_libraries(${OPENCV_PLUGIN_NAME} PRIVATE ${OpenCV_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user