Skip to content

Commit 09ce987

Browse files
committed
cmake: fix export issue
opencv_ts is static internal library and in case of exporting it requires all static dependencies (include HAL files)
1 parent a76fd43 commit 09ce987

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/OpenCVModule.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,8 @@ macro(_ocv_create_module)
859859
endif()
860860

861861
get_target_property(_target_type ${the_module} TYPE)
862-
if("${_target_type}" STREQUAL "SHARED_LIBRARY" OR (NOT BUILD_SHARED_LIBS OR NOT INSTALL_CREATE_DISTRIB))
862+
if(OPENCV_MODULE_${the_module}_CLASS STREQUAL "PUBLIC" AND
863+
("${_target_type}" STREQUAL "SHARED_LIBRARY" OR (NOT BUILD_SHARED_LIBS OR NOT INSTALL_CREATE_DISTRIB)))
863864
ocv_install_target(${the_module} EXPORT OpenCVModules OPTIONAL
864865
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
865866
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs NAMELINK_SKIP

0 commit comments

Comments
 (0)