Browse Source

Support Qt 6 modules when generating the dependency list for the config header

charconv
Martchus 1 year ago
parent
commit
a5d2aa15e0
  1. 5
      cmake/modules/ConfigHeader.cmake

5
cmake/modules/ConfigHeader.cmake

@ -35,12 +35,15 @@ foreach (DEPENDENCY IN LISTS LINK_LIBRARIES_LIST INTERFACE_LINK_LIBRARIES_LIST)
# find version and display name for target
unset(DEPENDENCY_VER)
unset(DEPENDENCY_DISPLAY_NAME)
if (DEPENDENCY MATCHES "((Static)?Qt5)::([A-Za-z0-9]+)")
if (DEPENDENCY MATCHES "((Static)?Qt[0-9]+)::([A-Za-z0-9]+)")
# read meta-data of Qt module
set(DEPENDENCY_MODULE_PREFIX "${CMAKE_MATCH_1}")
set(DEPENDENCY_MODULE_NAME "${CMAKE_MATCH_3}")
set(DEPENDENCY_DISPLAY_NAME "Qt ${DEPENDENCY_MODULE_NAME}")
set(DEPENDENCY_VER "${${DEPENDENCY_MODULE_PREFIX}${DEPENDENCY_MODULE_NAME}_VERSION_STRING}")
if (NOT DEPENDENCY_VER)
set(DEPENDENCY_VER "${${DEPENDENCY_MODULE_PREFIX}${DEPENDENCY_MODULE_NAME}_VERSION}")
endif ()
elseif (DEPENDENCY STREQUAL ZLIB::ZLIB)
set(DEPENDENCY_DISPLAY_NAME "zlib")
set(DEPENDENCY_VER "${ZLIB_VERSION_STRING}")

Loading…
Cancel
Save