From 09ce9875527f0c2041d720c22f079cc0dfe6aa9e Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 21 Jun 2016 22:32:30 +0300 Subject: [PATCH] cmake: fix export issue opencv_ts is static internal library and in case of exporting it requires all static dependencies (include HAL files) --- cmake/OpenCVModule.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index bd3286c2a2..ee14c7922c 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -859,7 +859,8 @@ macro(_ocv_create_module) endif() get_target_property(_target_type ${the_module} TYPE) - if("${_target_type}" STREQUAL "SHARED_LIBRARY" OR (NOT BUILD_SHARED_LIBS OR NOT INSTALL_CREATE_DISTRIB)) + if(OPENCV_MODULE_${the_module}_CLASS STREQUAL "PUBLIC" AND + ("${_target_type}" STREQUAL "SHARED_LIBRARY" OR (NOT BUILD_SHARED_LIBS OR NOT INSTALL_CREATE_DISTRIB))) ocv_install_target(${the_module} EXPORT OpenCVModules OPTIONAL RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs NAMELINK_SKIP