- Refactor on platform implementation. See comment in interface/platform.h for more info
This commit is contained in:
@@ -42,7 +42,5 @@ if(FENNEC_GRAPHICS_WANT_EGL)
|
||||
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::EGL)
|
||||
list(APPEND FENNEC_COMPILE_DEFINITIONS FENNEC_GRAPHICS_EGL=1)
|
||||
list(APPEND FENNEC_EXTRA_SOURCES
|
||||
include/fennec/platform/opengl/egl/context.h
|
||||
include/fennec/platform/opengl/egl/surface.h
|
||||
)
|
||||
endif()
|
||||
@@ -21,4 +21,9 @@
|
||||
# compile definitions
|
||||
list(APPEND FENNEC_COMPILE_DEFINITIONS
|
||||
FENNEC_PLATFORM_UNIX=1
|
||||
)
|
||||
|
||||
# extra source files
|
||||
list(APPEND FENNEC_EXTRA_SOURCES
|
||||
include/fennec/platform/unix/platform.h source/platform/unix/platform.cpp
|
||||
)
|
||||
@@ -43,6 +43,11 @@ macro(fennec_check_wayland)
|
||||
|
||||
if( (WAYLAND_CLIENT_INCLUDE_DIR AND WAYLAND_CLIENT_LIBRARY)
|
||||
AND (WAYLAND_EGL_INCLUDE_DIR AND WAYLAND_EGL_LIBRARY))
|
||||
message(STATUS "Found Wayland: ${WAYLAND_CLIENT_LIBRARY}")
|
||||
|
||||
include("${FENNEC_SOURCE_DIR}/cmake/xkb.cmake")
|
||||
fennec_check_xkb()
|
||||
|
||||
get_filename_component(
|
||||
WAYLAND_CLIENT_LIBRARY
|
||||
${WAYLAND_CLIENT_LIBRARY}
|
||||
@@ -64,11 +69,10 @@ macro(fennec_check_wayland)
|
||||
include/fennec/platform/linux/wayland/lib/sym.h
|
||||
include/fennec/platform/linux/wayland/lib/wayland-client.h
|
||||
include/fennec/platform/linux/wayland/lib/wayland-util.h
|
||||
include/fennec/platform/linux/wayland/lib/dyn.h source/platform/linux/wayland/lib/dyn.cpp
|
||||
include/fennec/platform/linux/wayland/lib/loader.h source/platform/linux/wayland/lib/loader.cpp
|
||||
|
||||
# Fennec Files
|
||||
include/fennec/platform/linux/wayland/displaydev.h source/platform/linux/wayland/displaydev.cpp
|
||||
include/fennec/platform/linux/wayland/window.h source/platform/linux/wayland/window.cpp
|
||||
include/fennec/platform/linux/wayland/display.h source/platform/linux/wayland/display.cpp
|
||||
)
|
||||
|
||||
list(APPEND FENNEC_COMPILE_DEFINITIONS
|
||||
|
||||
59
cmake/xkb.cmake
Normal file
59
cmake/xkb.cmake
Normal file
@@ -0,0 +1,59 @@
|
||||
# ======================================================================================================================
|
||||
# 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://www.gnu.org/licenses/>.
|
||||
# ======================================================================================================================
|
||||
|
||||
# this script finds libxkbcommon and dependencies
|
||||
|
||||
macro(fennec_check_xkb)
|
||||
set(XKB_FOUND 0)
|
||||
|
||||
find_path(
|
||||
XKB_INCLUDE_DIR
|
||||
NAMES xkbcommon/xkbcommon.h
|
||||
)
|
||||
find_library(
|
||||
XKB_LIBRARY
|
||||
NAMES xkbcommon libxkbcommon
|
||||
)
|
||||
|
||||
if(XKB_INCLUDE_DIR AND XKB_LIBRARY)
|
||||
message(STATUS "Found XKB: ${XKB_LIBRARY}")
|
||||
|
||||
get_filename_component(
|
||||
XKB_LIBRARY
|
||||
${XKB_LIBRARY}
|
||||
NAME
|
||||
)
|
||||
|
||||
set(XKB_FOUND 1)
|
||||
|
||||
list(APPEND FENNEC_EXTRA_SOURCES
|
||||
# Dynamic Library Files
|
||||
include/fennec/platform/linux/xkb/lib/fwd.h
|
||||
include/fennec/platform/linux/xkb/lib/sym.h
|
||||
include/fennec/platform/linux/xkb/lib/xkbcommon.h
|
||||
include/fennec/platform/linux/xkb/lib/loader.h source/platform/linux/xkb/lib/loader.cpp
|
||||
|
||||
# Fennec files
|
||||
)
|
||||
|
||||
list(APPEND FENNEC_COMPILE_DEFINITIONS
|
||||
FENNEC_HAS_XKB=1
|
||||
FENNEC_LIB_XKB="${XKB_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
Reference in New Issue
Block a user