From 086e969b024ee95d3a5ba9dc5b07005f367f7641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Thu, 10 Aug 2017 12:14:06 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@265 a8b55f48-bf90-11e4-a774-851b48703e85 --- qad/FindQAD.cmake | 2 ++ qad/QtWraps.cmake | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/qad/FindQAD.cmake b/qad/FindQAD.cmake index f2921e3..4937148 100644 --- a/qad/FindQAD.cmake +++ b/qad/FindQAD.cmake @@ -26,6 +26,8 @@ foreach(_Q ${_QAD_LIBS}) else() foreach(_v ${_QT_VERSIONS_}) find_library(QAD${_v}_${_QU}_LIBRARY qad_${_Q}${_v} ${_SEARCH_DIR}) + set(MULTILIB_${_Q}_SUFFIX_Qt${_v} ${_v}) + set(MULTILIB_${_Q}_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE) endforeach() endif() #message(STATUS "Library ${_Q} (${_QU}) -> ${QAD_${_QU}_LIBRARY} found in ${_SEARCH_DIR}") diff --git a/qad/QtWraps.cmake b/qad/QtWraps.cmake index 339f9a2..ad53635 100644 --- a/qad/QtWraps.cmake +++ b/qad/QtWraps.cmake @@ -4,6 +4,7 @@ set(_QT_VERSIONS_ 4 5) foreach(_v ${_QT_VERSIONS_}) if (NOT DEFINED TARGET_SUFFIX_Qt${_v}) set(TARGET_SUFFIX_Qt${_v} "${_v}") + set(MULTILIB_SUFFIX_Qt${_v} "${_v}") endif() set(MOC_INC_Qt${_v}) endforeach() @@ -382,11 +383,20 @@ macro(qt_add_library _NAME) endmacro() +macro(_qt_multitarget_suffix_ _OUT _IN _v) + if (NOT "x${MULTILIB_${_IN}_SUFFIX_Qt${_v}}" STREQUAL "x") + set(${_OUT} ${_IN}${MULTILIB_${_IN}_SUFFIX_Qt${_v}}) + else() + set(${_OUT} ${_IN}${MULTILIB_SUFFIX_Qt${_v}}) + endif() +endmacro() + + # usage: qt_target_link_libraries( ... ...) # link targets for founded Qt versions, target names is # all needed Qt libraries automatic added to corresponding targets # if QT_MULTILIB_LIST contains some linking library, to it name automatic -# add +# add or individual libname<_SUFFIX_Qt?> macro(qt_target_link_libraries _NAME) foreach(_v ${_QT_VERSIONS_}) if (LOCAL_FOUND${_v}) @@ -396,7 +406,8 @@ macro(qt_target_link_libraries _NAME) set(_ind -1) list(FIND QT_MULTILIB_LIST "${_i}" _ind) if (_ind GREATER_EQUAL 0) - list(APPEND _ARGS ${_i}${TARGET_SUFFIX_Qt${_v}}) + _qt_multitarget_suffix_(_TS ${_i} ${_v}) + list(APPEND _ARGS ${_i}${_TS}) else() list(APPEND _ARGS ${_i}) endif()