Compare commits
No commits in common. "9b02b948058182d9e2cd14e80b924cf1bdfa635a" and "16bdcb2991d7a17fea4847b12f066484de82f0c1" have entirely different histories.
9b02b94805
...
16bdcb2991
13
CMakeLists.txt
Normal file
13
CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
project(wayland-cli)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME})
|
||||||
|
|
||||||
|
target_sources(${PROJECT_NAME} PRIVATE main.cc)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
find_package(Wayland REQUIRED)
|
||||||
|
|
||||||
|
include_directories(${WAYLAND_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(${PROJECT_NAME} ${WAYLAND_LIBRARIES})
|
||||||
24
cmake/FindWayland.cmake
Normal file
24
cmake/FindWayland.cmake
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Find the Wayland package
|
||||||
|
find_path(WAYLAND_INCLUDE_DIR
|
||||||
|
NAMES wayland-client.h
|
||||||
|
PATH_SUFFIXES wayland
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(WAYLAND_LIBRARY
|
||||||
|
NAMES wayland-client
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(WAYLAND_EGL_LIBRARY
|
||||||
|
NAMES wayland-egl
|
||||||
|
)
|
||||||
|
|
||||||
|
# Handle the QUIETLY and REQUIRED arguments and set WAYLAND_FOUND to TRUE if all listed variables are TRUE
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Wayland DEFAULT_MSG WAYLAND_LIBRARY WAYLAND_INCLUDE_DIR)
|
||||||
|
|
||||||
|
if(WAYLAND_FOUND)
|
||||||
|
set(WAYLAND_LIBRARIES ${WAYLAND_LIBRARY} ${WAYLAND_EGL_LIBRARY})
|
||||||
|
set(WAYLAND_INCLUDE_DIRS ${WAYLAND_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(WAYLAND_INCLUDE_DIR WAYLAND_LIBRARY)
|
||||||
2
main.cc
2
main.cc
@ -14,5 +14,7 @@ int main()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wl_registry* registry = wl_display_get_registry(display);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1,8 +0,0 @@
|
|||||||
project('wl-cli', 'cpp')
|
|
||||||
|
|
||||||
client = dependency('wayland-client')
|
|
||||||
egl = dependency('wayland-egl')
|
|
||||||
|
|
||||||
src = ['main.cc']
|
|
||||||
|
|
||||||
executable('wl-cli', sources : src, dependencies : [client, egl])
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = wayland-1.23.1
|
|
||||||
source_url = https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.23.1/downloads/wayland-1.23.1.tar.xz
|
|
||||||
source_filename = wayland-1.23.1.tar.xz
|
|
||||||
source_hash = 864fb2a8399e2d0ec39d56e9d9b753c093775beadc6022ce81f441929a81e5ed
|
|
||||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/wayland_1.23.1-1/wayland-1.23.1.tar.xz
|
|
||||||
wrapdb_version = 1.23.1-1
|
|
||||||
|
|
||||||
[provide]
|
|
||||||
wayland-cursor = wayland_cursor_dep
|
|
||||||
wayland-egl = wayland_egl_dep
|
|
||||||
wayland-server = wayland_server_dep
|
|
||||||
wayland-client = wayland_client_dep
|
|
||||||
Loading…
x
Reference in New Issue
Block a user