Skip to content

Commit

Permalink
Merge pull request #4416 from Be-ing/qt6_link_x
Browse files Browse the repository at this point in the history
CMake: link to Xlib with Qt6
  • Loading branch information
uklotzde authored Oct 14, 2021
2 parents e3570b1 + f8a6f8b commit f8dba81
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2191,11 +2191,16 @@ if(APPLE)
)
endif()
elseif(UNIX AND NOT APPLE)
if(NOT QT6)
if(QT6)
find_package(X11)
else()
find_package(X11 REQUIRED)
find_package(Qt5 COMPONENTS X11Extras REQUIRED)
target_link_libraries(mixxx-lib PRIVATE Qt5::X11Extras)
endif()
if(${X11_FOUND})
target_include_directories(mixxx-lib SYSTEM PUBLIC "${X11_INCLUDE_DIR}")
target_link_libraries(mixxx-lib PRIVATE "${X11_LIBRARIES}" Qt5::X11Extras)
target_link_libraries(mixxx-lib PRIVATE "${X11_LIBRARIES}")
endif()
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS DBus REQUIRED)
target_link_libraries(mixxx-lib PRIVATE
Expand Down

0 comments on commit f8dba81

Please sign in to comment.