Skip to content

Commit

Permalink
Rework
Browse files Browse the repository at this point in the history
-registrar abstraction
-remove cursor (for now)
-support many output
-support many seats

Signed-off-by: Joel Winarske <[email protected]>
  • Loading branch information
jwinarske committed Apr 16, 2024
1 parent e974ba1 commit a2e6034
Show file tree
Hide file tree
Showing 236 changed files with 56,981 additions and 1,589 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,25 @@ message(STATUS "Build Type ............. ${CMAKE_BUILD_TYPE}")
include(compiler)
include(utils)

include_directories(include)

#
# libraries
#
include(wayland)
add_subdirectory(third_party)


#
# library
#
add_subdirectory(src)

#
# Demos
# Examples
#
add_subdirectory(demo)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif ()

if (BUILD_UNIT_TESTS)
enable_testing()
Expand Down
11 changes: 1 addition & 10 deletions cmake/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,7 @@ COMPILER_FLAGS_APPEND(RELEASE " -fno-omit-frame-pointer" "-f(no-)?omit-frame-poi
COMPILER_FLAGS_APPEND(RELEASE " -Wformat=2" "-Wformat(=[0-9]+)?")
COMPILER_FLAGS_APPEND(RELEASE " -D_FORTIFY_SOURCE=2" "-D_FORTIFY_SOURCE(=[0-9]+)?")

if (BUILD_PLUGIN_FIREBASE_CORE OR
BUILD_PLUGIN_CLOUD_FIRESTORE OR
BUILD_PLUGIN_FIREBASE_AUTH OR
BUILD_PLUGIN_FIREBASE_STORAGE OR
BUILD_CRASH_HANDLER OR
BUILD_PLUGIN_FILAMENT_VIEW)
string(APPEND CMAKE_CXX_FLAGS " -frtti")
else ()
string(APPEND CMAKE_CXX_FLAGS " -fno-rtti")
endif ()
string(APPEND CMAKE_CXX_FLAGS " -frtti")

string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,--build-id=sha1")

Expand Down
7 changes: 7 additions & 0 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
# limitations under the License.
#


#
# Examples
#
option(BUILD_EXAMPLES "Build Examples" ON)
MESSAGE(STATUS "Build Examples ......... ${BUILD_EXAMPLES}")

#
# Unit Tests
#
Expand Down
32 changes: 32 additions & 0 deletions cmake/wayland.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@ wayland_generate(
${WAYLAND_PROTOCOLS_BASE}/stable/xdg-shell/xdg-shell.xml
${CMAKE_CURRENT_BINARY_DIR}/xdg-shell-client-protocol)

if (EXISTS ${WAYLAND_PROTOCOLS_BASE}/staging/fractional-scale/fractional-scale-v1.xml)
set(WAYLAND_PROTOCOL_HAS_FRACTIONAL_SCALE ON)
wayland_generate(
${WAYLAND_PROTOCOLS_BASE}/staging/fractional-scale/fractional-scale-v1.xml
${CMAKE_CURRENT_BINARY_DIR}/fractional-scale-v1-client-protocol)
endif ()

if (EXISTS ${WAYLAND_PROTOCOLS_BASE}/stable/viewporter/viewporter.xml)
set(WAYLAND_PROTOCOL_HAS_VIEWPORTER ON)
wayland_generate(
${WAYLAND_PROTOCOLS_BASE}/stable/viewporter/viewporter.xml
${CMAKE_CURRENT_BINARY_DIR}/viewporter-client-protocol)
endif ()

if (EXISTS ${WAYLAND_PROTOCOLS_BASE}/staging/tearing-control/tearing-control-v1.xml)
set(WAYLAND_PROTOCOL_HAS_TEARING_CONTROL ON)
wayland_generate(
${WAYLAND_PROTOCOLS_BASE}/staging/tearing-control/tearing-control-v1.xml
${CMAKE_CURRENT_BINARY_DIR}/tearing-control-v1-client-protocol)
endif ()

wayland_generate(
${WAYLAND_PROTOCOLS_BASE}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
${CMAKE_CURRENT_BINARY_DIR}/xdg-decoration-unstable-client-protocol)
Expand Down Expand Up @@ -87,6 +108,17 @@ endif ()
if (ENABLE_IVI_SHELL_CLIENT)
target_compile_definitions(wayland-gen PUBLIC ENABLE_IVI_SHELL_CLIENT)
endif ()
if (WAYLAND_PROTOCOL_HAS_FRACTIONAL_SCALE)
target_compile_definitions(wayland-gen PUBLIC WAYLAND_PROTOCOL_HAS_FRACTIONAL_SCALE)
endif ()

if (WAYLAND_PROTOCOL_HAS_VIEWPORTER)
target_compile_definitions(wayland-gen PUBLIC WAYLAND_PROTOCOL_HAS_VIEWPORTER)
endif ()

if (WAYLAND_PROTOCOL_HAS_TEARING_CONTROL)
target_compile_definitions(wayland-gen PUBLIC WAYLAND_PROTOCOL_HAS_TEARING_CONTROL)
endif ()

target_include_directories(wayland-gen PUBLIC ${CMAKE_CURRENT_BINARY_DIR})

Expand Down
130 changes: 0 additions & 130 deletions demo/demo.cc

This file was deleted.

27 changes: 18 additions & 9 deletions demo/CMakeLists.txt → examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,22 @@
# limitations under the License.
#

# Define variables
set(TARGET_NAME demo)
set(SOURCE_FILE demo.cc)
set(COMPILE_DEFINITIONS EGL_NO_X11 MESA_EGL_NO_X11_HEADERS)
set(LINK_LIBRARIES waypp GLESv2)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLESv2 IMPORTED_TARGET glesv2)

#
# simple-egl
#
add_executable(simple-egl simple-egl.cc)
target_include_directories(simple-egl PRIVATE ${CMAKE_SOURCE_DIR}/include)

target_compile_definitions(simple-egl PRIVATE EGL_NO_X11 MESA_EGL_NO_X11_HEADERS)

target_link_libraries(simple-egl PRIVATE waypp PkgConfig::GLESv2 cxxopts::cxxopts)

if (IPO_SUPPORT_RESULT)
set_property(TARGET simple-egl PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif ()

add_sanitizers(simple-egl)

# Use variables in place of hard-coded values
add_executable(${TARGET_NAME} ${SOURCE_FILE})
target_compile_definitions(${TARGET_NAME} PRIVATE ${COMPILE_DEFINITIONS})
target_link_libraries(${TARGET_NAME} ${LINK_LIBRARIES})
Loading

0 comments on commit a2e6034

Please sign in to comment.