Skip to content

Commit

Permalink
CMake: improved handling of X11 and XCB (close #212)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Feb 5, 2024
1 parent 0b170b5 commit 0e84701
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions NativeApp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -463,18 +463,20 @@ elseif(PLATFORM_ANDROID)
include/Android
)
elseif(PLATFORM_LINUX)
find_package(X11 REQUIRED)
target_link_libraries(Diligent-NativeAppBase
PRIVATE
X11
X11::X11
)
target_include_directories(Diligent-NativeAppBase
PUBLIC
include/Linux
)
if(VULKAN_SUPPORTED)
find_library(XCB_LIBRARY xcb)
target_link_libraries(Diligent-NativeAppBase
PRIVATE
xcb
${XCB_LIBRARY}
)
endif()
elseif(PLATFORM_MACOS)
Expand Down
3 changes: 2 additions & 1 deletion NativeApp/Linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ target_include_directories(XCBKeySyms PUBLIC .)
source_group("source" FILES ${SOURCE})
source_group("interface" FILES ${INTERFACE})

find_library(XCB_LIBRARY xcb)
target_link_libraries(XCBKeySyms
PRIVATE
Diligent-BuildSettings
xcb
${XCB_LIBRARY}
)

set_target_properties(XCBKeySyms PROPERTIES
Expand Down

0 comments on commit 0e84701

Please sign in to comment.