diff --git a/CMakeLists.txt b/CMakeLists.txt index ae2397b25..b15882ce4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,4 +63,4 @@ add_subdirectory(session) add_subdirectory(render) add_subdirectory(util) -add_subdirectory(example) +add_subdirectory(examples) diff --git a/example/CMakeLists.txt b/examples/CMakeLists.txt similarity index 97% rename from example/CMakeLists.txt rename to examples/CMakeLists.txt index 100e110ae..956ea8867 100644 --- a/example/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -67,7 +67,7 @@ target_link_libraries(tablet ) add_executable(compositor - compositor + compositor/main.c shared.c ) @@ -75,6 +75,5 @@ target_link_libraries(compositor wlr-backend wlr-session wlr-render - wlr-wayland ${XKBCOMMON_LIBRARIES} ) diff --git a/example/cat.c b/examples/cat.c similarity index 100% rename from example/cat.c rename to examples/cat.c diff --git a/example/cat.h b/examples/cat.h similarity index 100% rename from example/cat.h rename to examples/cat.h diff --git a/example/compositor.c b/examples/compositor/main.c similarity index 92% rename from example/compositor.c rename to examples/compositor/main.c index a52fe4603..3e83978ed 100644 --- a/example/compositor.c +++ b/examples/compositor/main.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include "shared.h" @@ -38,7 +37,6 @@ int main() { state.renderer = wlr_gles2_renderer_init(); wl_display_init_shm(compositor.display); - wlr_compositor_init(compositor.display); compositor_run(&compositor); } diff --git a/example/pointer.c b/examples/pointer.c similarity index 100% rename from example/pointer.c rename to examples/pointer.c diff --git a/example/rotation.c b/examples/rotation.c similarity index 100% rename from example/rotation.c rename to examples/rotation.c diff --git a/example/shared.c b/examples/shared.c similarity index 100% rename from example/shared.c rename to examples/shared.c diff --git a/example/shared.h b/examples/shared.h similarity index 100% rename from example/shared.h rename to examples/shared.h diff --git a/example/simple.c b/examples/simple.c similarity index 100% rename from example/simple.c rename to examples/simple.c diff --git a/example/tablet.c b/examples/tablet.c similarity index 100% rename from example/tablet.c rename to examples/tablet.c diff --git a/example/touch.c b/examples/touch.c similarity index 100% rename from example/touch.c rename to examples/touch.c