From 9ab612ff5c9defc35333799c55b01be31aa66fc2 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 17 Nov 2022 15:27:05 +0000 Subject: [PATCH] Update cmake docs to mention Qt version in cmake --- HowToSetProject-cmake.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HowToSetProject-cmake.md b/HowToSetProject-cmake.md index fc12c37..6ec34ab 100644 --- a/HowToSetProject-cmake.md +++ b/HowToSetProject-cmake.md @@ -34,11 +34,11 @@ In your CMakeLists.txt: add_subdirectory(QXlsx) target_link_libraries(myapp PRIVATE QXlsx::QXlsx) ``` + 2) Use cmake FetchContent In your CMakeLists.txt: ```cmake - FetchContent_Declare( QXlsx GIT_REPOSITORY https://github.com/QtExcel/QXlsx.git @@ -48,3 +48,5 @@ FetchContent_Declare( FetchContent_MakeAvailable(QXlsx) target_link_libraries(myapp PRIVATE QXlsx::QXlsx) ``` + +if `QT_VERSION_MAJOR` is not set, QXlsx's CMakeLists.txt will try to find a Qt version (5 or 6) itself.