FindQAD multiple add target fix

This commit is contained in:
2020-07-09 13:11:23 +03:00
parent 61316462fa
commit 760c57a843

View File

@@ -101,21 +101,23 @@ foreach(_Q ${_QAD_LIBS})
set(_target QAD::${_ITN_${_Q}}) set(_target QAD::${_ITN_${_Q}})
string(REPLACE ":" "_" _target_str "${_target}") string(REPLACE ":" "_" _target_str "${_target}")
foreach(_v ${_QT_VERSIONS_}) foreach(_v ${_QT_VERSIONS_})
set(_link_list) if(NOT TARGET ${_target}${_v})
foreach(_l ${_ITLL_${_Q}}) set(_link_list)
list(APPEND _link_list ${_l}${_v}) foreach(_l ${_ITLL_${_Q}})
endforeach() list(APPEND _link_list ${_l}${_v})
add_library(${_target}${_v} UNKNOWN IMPORTED) endforeach()
set_target_properties(${_target}${_v} PROPERTIES add_library(${_target}${_v} UNKNOWN IMPORTED)
IMPORTED_LOCATION "${QAD${_v}_${_QU}_LIBRARY}" set_target_properties(${_target}${_v} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${QAD_INCLUDES}" IMPORTED_LOCATION "${QAD${_v}_${_QU}_LIBRARY}"
INTERFACE_LINK_LIBRARIES "${_link_list}") INTERFACE_INCLUDE_DIRECTORIES "${QAD_INCLUDES}"
set(MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v}) INTERFACE_LINK_LIBRARIES "${_link_list}")
if(hasParent) set(MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v})
set(MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE) if(hasParent)
set(MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
endif()
#message(STATUS "add imported ${_target}${_v}")
#message(STATUS "add MULTILIB MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v}")
endif() endif()
#message(STATUS "add imported ${_target}${_v}")
#message(STATUS "add MULTILIB MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v}")
endforeach() endforeach()
list(APPEND QT_MULTILIB_LIST ${_target}) list(APPEND QT_MULTILIB_LIST ${_target})
endforeach() endforeach()