# ====================================================================================================================== # fennec, a free and open source game engine # Copyright © 2025 Medusa Slockbower # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ====================================================================================================================== # https://gist.github.com/mariobadr/acc3c8adf4b4e722705be38c3deac59a macro(fennec_check_wayland) set(WAYLAND_CLIENT_FOUND 0) find_path( WAYLAND_CLIENT_INCLUDE_DIR NAMES wayland-client.h ) find_library( WAYLAND_CLIENT_LIBRARY NAMES wayland-client libwayland-client ) get_filename_component( WAYLAND_CLIENT_LIBRARY ${WAYLAND_CLIENT_LIBRARY} NAME ) if(WAYLAND_CLIENT_INCLUDE_DIR AND WAYLAND_CLIENT_LIBRARY) set(WAYLAND_CLIENT_FOUND 1) add_library(wayland::client UNKNOWN IMPORTED) set_target_properties( wayland::client PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${WAYLAND_CLIENT_INCLUDE_DIR}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${WAYLAND_CLIENT_LIBRARY}" ) list(APPEND FENNEC_EXTRA_SOURCES # Dynamic Library Files include/fennec/platform/linux/wayland/lib/fwd.h include/fennec/platform/linux/wayland/lib/sym.h include/fennec/platform/linux/wayland/lib/sym_def.h include/fennec/platform/linux/wayland/lib/dyn.h source/platform/linux/wayland/lib/dyn.cpp # Fennec Files include/fennec/platform/linux/wayland/display.h source/platform/linux/wayland/display.cpp ) list(APPEND FENNEC_COMPILE_DEFINITIONS FENNEC_LIB_WAYLAND="${WAYLAND_CLIENT_LIBRARY}") endif() endmacro()