1
0
Fork 0

Add desktop-app::external_xcb

This commit is contained in:
Ilya Fedin 2020-10-04 07:37:34 +04:00 committed by John Preston
parent 68438bb43d
commit 001c41a6be
4 changed files with 38 additions and 8 deletions

View file

@ -65,5 +65,8 @@ add_checked_subdirectory(variant)
if (NOT DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
add_checked_subdirectory(webrtc)
endif()
if (LINUX)
add_checked_subdirectory(xcb)
endif()
add_checked_subdirectory(xxhash)
add_checked_subdirectory(zlib)

View file

@ -46,12 +46,12 @@ else()
PRIVATE
desktop-app::external_fcitx5_qt5_dbusaddons
desktop-app::external_qt
desktop-app::external_xcb
)
if (DESKTOP_APP_USE_PACKAGED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon)
pkg_check_modules(XCB REQUIRED IMPORTED_TARGET xcb)
target_link_libraries(external_fcitx5_qt5
PRIVATE
@ -61,22 +61,15 @@ else()
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED xkbcommon)
pkg_check_modules(XCB REQUIRED xcb)
target_include_directories(external_fcitx5_qt5
PUBLIC
${XKBCOMMON_INCLUDE_DIRS}
${XCB_INCLUDE_DIRS}
)
target_link_static_libraries(external_fcitx5_qt5
PRIVATE
xkbcommon
)
target_link_libraries(external_fcitx5_qt5
PRIVATE
xcb
)
endif()
endif()

18
external/xcb/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,18 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
add_library(external_xcb INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_xcb ALIAS external_xcb)
add_subdirectory(xcb_screensaver)
if (DESKTOP_APP_USE_PACKAGED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB REQUIRED IMPORTED_TARGET xcb)
target_link_libraries(external_xcb INTERFACE PkgConfig::XCB)
else()
target_link_libraries(external_xcb INTERFACE xcb)
endif()

View file

@ -0,0 +1,16 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
add_library(external_xcb_screensaver INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_xcb_screensaver ALIAS external_xcb_screensaver)
if (DESKTOP_APP_USE_PACKAGED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB_SCREENSAVER REQUIRED IMPORTED_TARGET xcb-screensaver)
target_link_libraries(external_xcb_screensaver INTERFACE PkgConfig::XCB_SCREENSAVER)
else()
target_link_static_libraries(external_xcb_screensaver INTERFACE xcb-screensaver)
endif()