Skip to content

Commit 0e84701

Browse files
CMake: improved handling of X11 and XCB (close #212)
1 parent 0b170b5 commit 0e84701

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

NativeApp/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,18 +463,20 @@ elseif(PLATFORM_ANDROID)
463463
include/Android
464464
)
465465
elseif(PLATFORM_LINUX)
466+
find_package(X11 REQUIRED)
466467
target_link_libraries(Diligent-NativeAppBase
467468
PRIVATE
468-
X11
469+
X11::X11
469470
)
470471
target_include_directories(Diligent-NativeAppBase
471472
PUBLIC
472473
include/Linux
473474
)
474475
if(VULKAN_SUPPORTED)
476+
find_library(XCB_LIBRARY xcb)
475477
target_link_libraries(Diligent-NativeAppBase
476478
PRIVATE
477-
xcb
479+
${XCB_LIBRARY}
478480
)
479481
endif()
480482
elseif(PLATFORM_MACOS)

NativeApp/Linux/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ target_include_directories(XCBKeySyms PUBLIC .)
1818
source_group("source" FILES ${SOURCE})
1919
source_group("interface" FILES ${INTERFACE})
2020

21+
find_library(XCB_LIBRARY xcb)
2122
target_link_libraries(XCBKeySyms
2223
PRIVATE
2324
Diligent-BuildSettings
24-
xcb
25+
${XCB_LIBRARY}
2526
)
2627

2728
set_target_properties(XCBKeySyms PROPERTIES

0 commit comments

Comments
 (0)