检测显示器信息
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
set(APP_NAME "zswm")
|
||||
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# generate compile_commands.json for clangd
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
@@ -14,7 +15,26 @@ project(${APP_NAME}
|
||||
LANGUAGES C
|
||||
)
|
||||
|
||||
add_executable(${APP_NAME} main.c)
|
||||
add_executable(${APP_NAME} main.c utils.c)
|
||||
|
||||
# use C17
|
||||
set_property(TARGET ${APP_NAME} PROPERTY C_STANDARD 17)
|
||||
|
||||
target_include_directories(${APP_NAME} PRIVATE "${SOURCE_DIR}/include")
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(XCB REQUIRED
|
||||
xcb
|
||||
xcb-cursor
|
||||
xcb-icccm
|
||||
xcb-keysyms
|
||||
xcb-util
|
||||
xcb-xfixes
|
||||
xcb-xinerama
|
||||
xcb-xrm
|
||||
)
|
||||
target_include_directories(${APP_NAME} SYSTEM PUBLIC ${XCB_INCLUDE_DIRS})
|
||||
|
||||
add_subdirectory(xcb)
|
||||
target_link_libraries(${APP_NAME} ${LIB_XCB_NAME})
|
||||
|
||||
Reference in New Issue
Block a user