@@ -18,10 +18,6 @@ if(MSVC)
1818 add_compile_options (/permissive-)
1919endif ()
2020
21- set (USE_QT_VERSION "" CACHE STRING
22- "Version of Qt to use, 5 or 6 (Which is used by default can vary due to how cmake find functions work, but will often default to Qt6)"
23- )
24-
2521option (BUILD_LDF_READER
2622 "build ld_ldf_reader"
2723 ON
@@ -39,28 +35,9 @@ set(CMAKE_AUTOMOC ON)
3935include (GNUInstallDirs)
4036set (CMAKE_AUTOUIC ON )
4137
42- set (QT_PACKAGE_NAMES Qt5 Qt6)
43- if (USE_QT_VERSION)
44- set (QT_PACKAGE_NAMES Qt${USE_QT_VERSION} )
45- endif ()
46- find_package (QT NAMES ${QT_PACKAGE_NAMES} REQUIRED COMPONENTS Core)
47- find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets Sql)
38+ find_package (Qt6 REQUIRED COMPONENTS Core Gui Widgets Sql)
4839message (STATUS "Qt Version: ${QT_VERSION} " )
4940
50- # For Qt < 5.15, emulate 5.15's Qt5CoreConfig.cmake, so we don't have to
51- # specify Qt5/Qt6 elsewhere.
52- if (QT_VERSION VERSION_LESS 5.15)
53- function (qt_add_resources outfiles)
54- qt5_add_resources("${outfiles} " ${ARGN} )
55- set ("${outfiles} " "${${outfiles} }" PARENT_SCOPE)
56- endfunction ()
57- foreach (library Core Gui Widgets)
58- add_library (Qt::${library} INTERFACE IMPORTED )
59- set_target_properties (Qt::${library} PROPERTIES
60- INTERFACE_LINK_LIBRARIES "Qt5::${library} " )
61- endforeach ()
62- endif ()
63-
6441find_package (PkgConfig REQUIRED)
6542
6643if (NOT MSVC )
0 commit comments