Skip to content

Commit

Permalink
improved Qt6 information in CMake (#6418)
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed May 22, 2024
1 parent f502d2a commit 8514929
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ include(cmake/findDependencies.cmake)
include(cmake/compileroptions.cmake)
include(cmake/compilerDefinitions.cmake)
include(cmake/buildFiles.cmake)
include(cmake/printInfo.cmake)
if(BUILD_GUI)
include(cmake/qtCompat.cmake)
endif()
include(cmake/printInfo.cmake)


file(GLOB addons "addons/*.py")
Expand Down
6 changes: 3 additions & 3 deletions cmake/findDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ if(BUILD_GUI)
endif()
if(USE_QT6)
find_package(Qt6 COMPONENTS ${qt_components} REQUIRED)
set(QT_VERSION "${Qt6Core_VERSION_STRING}")
set(QT_VERSION "${Qt6Core_VERSION}")
if(NOT QT_VERSION)
# TODO: how to get the actual version?
message(WARNING "'Qt6Core_VERSION_STRING' is not set - using 6.0.0 as fallback")
# TODO: remove fallback
message(WARNING "'Qt6Core_VERSION' is not set - using 6.0.0 as fallback")
set(QT_VERSION "6.0.0")
endif()
if(MSVC)
Expand Down
7 changes: 7 additions & 0 deletions cmake/printInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ if(BUILD_GUI)
message(STATUS "WITH_QCHART = ${WITH_QCHART}")
message(STATUS "USE_QT6 = ${USE_QT6}")
message(STATUS "QT_VERSION = ${QT_VERSION}")
if(USE_QT6)
message(STATUS "Qt6Core_LIBRARIES = ${Qt6Core_LIBRARIES}")
message(STATUS "Qt6Core_INCLUDE_DIRS = ${Qt6Core_INCLUDE_DIRS}")
else()
message(STATUS "Qt5Core_LIBRARIES = ${Qt5Core_LIBRARIES}")
message(STATUS "Qt5Core_INCLUDE_DIRS = ${Qt5Core_INCLUDE_DIRS}")
endif()
endif()
message(STATUS)
message(STATUS "HAVE_RULES = ${HAVE_RULES}")
Expand Down

0 comments on commit 8514929

Please sign in to comment.