cmake: detect qt library type

Fixes: #200

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2023-01-05 15:07:38 +08:00
parent 16479be799
commit 814d2ad12d
1 changed files with 7 additions and 1 deletions

View File

@ -194,7 +194,13 @@ set(__qt_inst_dir ${__qt_inst_dir}/../../..)
cmake_path(NORMAL_PATH __qt_inst_dir)
message("Qt install dir: ${__qt_inst_dir}")
message("Qt version: ${QT_VERSION}")
# TODO: output shared/static Qt.
get_target_property(__qt_type Qt${QT_VERSION_MAJOR}::Core TYPE)
if(__qt_type STREQUAL "STATIC_LIBRARY")
set(__qt_type static)
else()
set(__qt_type shared)
endif()
message("Qt library type: ${__qt_type}")
message("#######################################")
message("FramelessHelper version: ${PROJECT_VERSION}")
message("FramelessHelper commit hash: ${PROJECT_VERSION_COMMIT}")