From c29e6de2e1bc4b0e9383dcd7bcc5e087fe382c90 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Tue, 18 Oct 2022 10:52:04 +0800 Subject: [PATCH] try to fix ci Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- CMakeLists.txt | 6 +++++- src/quick/CMakeLists.txt | 20 ++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07388af..fea49a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,13 +140,17 @@ message("C++ compiler: ${CMAKE_CXX_COMPILER}") message("Linker: ${CMAKE_LINKER}") message("Make program: ${CMAKE_MAKE_PROGRAM}") message("Build type: ${CMAKE_BUILD_TYPE}") +message("Install prefix: ${CMAKE_INSTALL_PREFIX}") message("#######################################") -set(__qt_inst_dir UNKNOWN) +set(__qt_inst_dir) if(DEFINED Qt6_DIR) set(__qt_inst_dir "${Qt6_DIR}") else() set(__qt_inst_dir "${Qt5_DIR}") endif() +# /whatever/Qt/6.4.0/gcc_64/lib/cmake/Qt6 +set(__qt_inst_dir ${__qt_inst_dir}/../../..) +cmake_path(NORMAL_PATH __qt_inst_dir __qt_inst_dir) message("Qt install dir: ${__qt_inst_dir}") message("Qt version: ${QT_VERSION}") # TODO: output shared/static Qt. diff --git a/src/quick/CMakeLists.txt b/src/quick/CMakeLists.txt index 1506c5d..0a2ed39 100644 --- a/src/quick/CMakeLists.txt +++ b/src/quick/CMakeLists.txt @@ -127,12 +127,20 @@ if(${QT_VERSION} VERSION_GREATER_EQUAL 6.2) set(__lib_suffix ${CMAKE_DEBUG_POSTFIX}) endif() set(__lib_ext) - if(WIN32) - set(__lib_ext dll) - elseif(APPLE) - set(__lib_ext dylib) - elseif(UNIX) - set(__lib_ext so) + if(FRAMELESSHELPER_BUILD_STATIC) + if(WIN32) + set(__lib_ext lib) + else() + set(__lib_ext a) + endif() + else() + if(WIN32) + set(__lib_ext dll) + elseif(APPLE) + set(__lib_ext dylib) + elseif(UNIX) + set(__lib_ext so) + endif() endif() install(FILES "${__import_dir}/qmldir"