X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=cmake%2Fmodules%2FQuasselMacros.cmake;fp=cmake%2Fmodules%2FQuasselMacros.cmake;h=099e8a22f22a4b9d9f9635b7a524672c9cc952d5;hb=907e6c4c2f5e199600b54213f6964d2c50bdc700;hp=0000000000000000000000000000000000000000;hpb=de5e60aac1e7e993d2c82b2e22e3a47ff429f268;p=quassel.git diff --git a/cmake/modules/QuasselMacros.cmake b/cmake/modules/QuasselMacros.cmake new file mode 100644 index 00000000..099e8a22 --- /dev/null +++ b/cmake/modules/QuasselMacros.cmake @@ -0,0 +1,15 @@ +# This macro sets variables for additional Qt modules. +# We need this because targets need different Qt4 modules, i.e. different libs +# and defines. We can't simply include UseQt4 several times, since definitions add up. +# We workaround this by using our own macro to figure out what to add. + +macro(setup_qt4_variables) + set(QUASSEL_QT_LIBRARIES ) + IF(WIN32) + set(MAIN MAIN) + ENDIF(WIN32) + foreach(qtmod CORE ${ARGV} ${MAIN}) + set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_QT${qtmod}_LIBRARY} ${QT_${qtmod}_LIB_DEPENDENCIES}) + endforeach(qtmod ${ARGV}) + set(QUASSEL_QT_LIBRARIES ${QUASSEL_QT_LIBRARIES} ${QT_LIBRARIES}) +endmacro(setup_qt4_variables)