20 lines
930 B
CMake
20 lines
930 B
CMake
cmake_minimum_required(VERSION 3.14)
|
|
project(wayland_test C)
|
|
|
|
find_package(PkgConfig)
|
|
|
|
# Server files
|
|
file(GLOB_RECURSE SERVER_SRC "src/server/*.c")
|
|
pkg_check_modules(WAYLAND_SERVER REQUIRED wayland-server)
|
|
add_executable(${PROJECT_NAME}_server ${SERVER_SRC})
|
|
target_link_libraries(${PROJECT_NAME}_server ${WAYLAND_SERVER_LIBRARIES})
|
|
target_include_directories(${PROJECT_NAME}_server PUBLIC ${WAYLAND_SERVER_INCLUDE_DIRS})
|
|
target_compile_options(${PROJECT_NAME}_server PUBLIC ${WAYLAND_SERVER_CFLAGS_OTHER})
|
|
|
|
# Client files
|
|
file(GLOB_RECURSE CLIENT_SRC "src/client/*.c")
|
|
pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client)
|
|
add_executable(${PROJECT_NAME}_client ${CLIENT_SRC})
|
|
target_link_libraries(${PROJECT_NAME}_client ${WAYLAND_CLIENT_LIBRARIES})
|
|
target_include_directories(${PROJECT_NAME}_client PUBLIC ${WAYLAND_CLIENT_INCLUDE_DIRS})
|
|
target_compile_options(${PROJECT_NAME}_client PUBLIC ${WAYLAND_CLIENT_CFLAGS_OTHER})
|