Use newer cmake syntax for XCB dependencies

This commit is contained in:
Martin Gräßlin 2015-11-06 10:32:20 +01:00
parent e95de33465
commit 286300ad35
3 changed files with 8 additions and 19 deletions

View File

@ -1,10 +1,5 @@
if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND) if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND)
add_definitions(-DHAVE_XCB_COMPOSITE=1) add_definitions(-DHAVE_XCB_COMPOSITE=1)
include_directories(
${XCB_XCB_INCLUDE_DIR}
${XCB_DAMAGE_INCLUDE_DIR}
${XCB_COMPOSITE_INCLUDE_DIR}
)
else() else()
add_definitions(-DHAVE_XCB_COMPOSITE=0) add_definitions(-DHAVE_XCB_COMPOSITE=0)
endif() endif()
@ -45,13 +40,13 @@ target_link_libraries(corebindingsplugin
) )
if(HAVE_X11) if(HAVE_X11)
target_link_libraries(corebindingsplugin ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} ) target_link_libraries(corebindingsplugin ${X11_LIBRARIES} XCB::XCB )
target_link_libraries(corebindingsplugin Qt5::X11Extras) target_link_libraries(corebindingsplugin Qt5::X11Extras)
if(XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND) if(XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND)
target_link_libraries(corebindingsplugin target_link_libraries(corebindingsplugin
${XCB_DAMAGE_LIBRARY} XCB::DAMAGE
${XCB_COMPOSITE_LIBRARY} XCB::COMPOSITE
) )
endif() endif()

View File

@ -99,7 +99,7 @@ add_library(KF5Plasma ${Plasma_LIB_SRCS})
add_library(KF5::Plasma ALIAS KF5Plasma) add_library(KF5::Plasma ALIAS KF5Plasma)
if(HAVE_X11) if(HAVE_X11)
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} Qt5::X11Extras ${X11_LIBRARIES} ${XCB_XCB_LIBRARY}) set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} Qt5::X11Extras ${X11_LIBRARIES} XCB::XCB)
endif() endif()
if(DL_LIBRARY) if(DL_LIBRARY)

View File

@ -1,16 +1,10 @@
if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND) if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND)
add_definitions(-DHAVE_XCB_COMPOSITE=1) add_definitions(-DHAVE_XCB_COMPOSITE=1)
include_directories(
${XCB_XCB_INCLUDE_DIR}
${XCB_DAMAGE_INCLUDE_DIR}
${XCB_COMPOSITE_INCLUDE_DIR}
)
else() else()
add_definitions(-DHAVE_XCB_COMPOSITE=0) add_definitions(-DHAVE_XCB_COMPOSITE=0)
endif() endif()
if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_SHAPE_FOUND) if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_SHAPE_FOUND)
add_definitions(-DHAVE_XCB_SHAPE=1) add_definitions(-DHAVE_XCB_SHAPE=1)
include_directories(${XCB_SHAPE_INCLUDE_DIR})
else() else()
add_definitions(-DHAVE_XCB_SHAPE=0) add_definitions(-DHAVE_XCB_SHAPE=0)
endif() endif()
@ -58,19 +52,19 @@ if(HAVE_X11)
PRIVATE PRIVATE
Qt5::X11Extras Qt5::X11Extras
${X11_LIBRARIES} ${X11_LIBRARIES}
${XCB_XCB_LIBRARY} XCB::XCB
) )
if(XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND) if(XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND)
target_link_libraries(KF5PlasmaQuick target_link_libraries(KF5PlasmaQuick
PRIVATE PRIVATE
${XCB_DAMAGE_LIBRARY} XCB::DAMAGE
${XCB_COMPOSITE_LIBRARY} XCB::COMPOSITE
) )
endif() endif()
if(XCB_SHAPE_FOUND) if(XCB_SHAPE_FOUND)
target_link_libraries(KF5PlasmaQuick PRIVATE ${XCB_SHAPE_LIBRARY}) target_link_libraries(KF5PlasmaQuick PRIVATE XCB::SHAPE)
endif() endif()
if(HAVE_GLX) if(HAVE_GLX)