mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
add basic cmake support
This commit is contained in:
parent
654c8edc6b
commit
64daecb266
26 changed files with 1242 additions and 0 deletions
16
cmake/Modules/MacroLinkQtComponents.cmake
Normal file
16
cmake/Modules/MacroLinkQtComponents.cmake
Normal file
|
@ -0,0 +1,16 @@
|
|||
# - macro similar to target_link_libraries, which links Qt components
|
||||
# names of the components are pased in Qt4/Qt5 agnostic way (Core, DBus, Xml...)
|
||||
# and the macro links Qt4 ones if QT4_FOUND is set or Qt5 ones if not
|
||||
|
||||
macro (target_link_qt_components target)
|
||||
if (QT4_FOUND)
|
||||
foreach(_cmp ${ARGN})
|
||||
list(APPEND _QT_CMPNTS "Qt4::Qt${_cmp}")
|
||||
endforeach()
|
||||
else (QT4_FOUND)
|
||||
foreach(_cmp ${ARGN})
|
||||
list(APPEND _QT_CMPNTS "Qt5::${_cmp}")
|
||||
endforeach()
|
||||
endif (QT4_FOUND)
|
||||
target_link_libraries(${target} ${_QT_CMPNTS})
|
||||
endmacro()
|
Loading…
Add table
Add a link
Reference in a new issue