Skip to content

Commit

Permalink
CMake: link to Xlib with Qt6
Browse files Browse the repository at this point in the history
This is required for src/util/screensaver.cpp.
  • Loading branch information
Be-ing committed Oct 14, 2021
1 parent fecfef3 commit 0c5df03
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2191,11 +2191,17 @@ if(APPLE)
)
endif()
elseif(UNIX AND NOT APPLE)
if(NOT QT6)
find_package(X11)
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 0c5df03

Please sign in to comment.