Поддержка Qt6

This commit is contained in:
Andrei Astafev 2023-07-30 10:10:29 +03:00
parent 2246f06397
commit 56e29e35c0

View File

@ -3,7 +3,7 @@ include_guard(GLOBAL)
macro(myx_find_required_packages)
set(options)
set(oneValueArgs)
set(multiValueArgs PACKAGES Boost Qt5 Qt5Private)
set(multiValueArgs PACKAGES Boost Qt5 Qt5Private Qt6 Qt6Private)
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
foreach(iter ${ARG_PACKAGES})
@ -24,6 +24,16 @@ macro(myx_find_required_packages)
endforeach()
endif()
if(ARG_Qt6)
find_package(Qt6 COMPONENTS ${ARG_Qt6} REQUIRED)
endif()
if(ARG_Qt6Private)
foreach(iter ${ARG_Qt6Private})
find_package("Qt6${iter}" COMPONENTS Private REQUIRED)
endforeach()
endif()
foreach(__iter IN LISTS oneValueArgs multiValueArgs)
unset(ARG_${__iter})
endforeach()