Skip to content

Commit f0dc7a2

Browse files
committed
Merge pull request opencv#6712 from alalek:cmake_export_fix
2 parents a76fd43 + 09ce987 commit f0dc7a2

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)