Skip to content

Commit

Permalink
Force QT5 due X11Extras deprecation in Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
redtide committed Aug 10, 2021
1 parent 93f9847 commit 43e769a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ set (CMAKE_AUTORCC ON)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets X11Extras REQUIRED)
find_package(Qt5 COMPONENTS Widgets X11Extras REQUIRED)

set (RESOURCE_FILES resources/resources.qrc)
set (SOURCE_FILES
Expand All @@ -29,7 +28,7 @@ add_executable(${PROJECT_NAME}
)
source_group ("Resource Files" FILES ${RESOURCE_FILES})
target_include_directories(${PROJECT_NAME} PRIVATE "src")
target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::X11Extras X11)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets Qt5::X11Extras X11)

if (UNIX AND NOT APPLE)
include (GNUInstallDirs)
Expand Down

0 comments on commit 43e769a

Please sign in to comment.