diff --git a/.gitmodules b/.gitmodules index c62f5b53..75de2db1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "wlroots"] - path = subprojects/wlroots - url = https://gitlab.freedesktop.org/wlroots/wlroots.git [submodule "subprojects/hyprland-protocols"] path = subprojects/hyprland-protocols url = https://github.com/hyprwm/hyprland-protocols @@ -10,3 +7,6 @@ [submodule "subprojects/tracy"] path = subprojects/tracy url = https://github.com/wolfpld/tracy +[submodule "subprojects/wlroots-hyprland"] + path = subprojects/wlroots-hyprland + url = https://github.com/hyprwm/wlroots-hyprland diff --git a/CMakeLists.txt b/CMakeLists.txt index 88caf6ef..b6021d89 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,16 +54,15 @@ else() endif() ExternalProject_Add( - wlroots - PREFIX ${CMAKE_SOURCE_DIR}/subprojects/wlroots - SOURCE_DIR ${CMAKE_SOURCE_DIR}/subprojects/wlroots - PATCH_COMMAND sed -E -i -e "s/(soversion = .*$)/soversion = 13032/g" meson.build - CONFIGURE_COMMAND meson setup --reconfigure build --buildtype=${BUILDTYPE_LOWER} -Dwerror=false -Dxwayland=$,disabled,enabled> -Dexamples=false -Drenderers=gles2 $,-Db_sanitize=address,-Db_sanitize=none> + wlroots-hyprland + PREFIX ${CMAKE_SOURCE_DIR}/subprojects/wlroots-hyprland + SOURCE_DIR ${CMAKE_SOURCE_DIR}/subprojects/wlroots-hyprland + CONFIGURE_COMMAND meson setup --reconfigure build --buildtype=${BUILDTYPE_LOWER} -Dwerror=false -Dxwayland=$,disabled,enabled> -Dexamples=false -Drenderers=gles2 -Dbackends=drm,libinput $,-Db_sanitize=address,-Db_sanitize=none> BUILD_COMMAND ninja -C build BUILD_ALWAYS true BUILD_IN_SOURCE true - BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/subprojects/wlroots/build/libwlroots.so.13032 - INSTALL_COMMAND echo "wlroots: install not needed" + BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/subprojects/wlroots-hyprland/build/libwlroots.a + INSTALL_COMMAND echo "wlroots-hyprland: install not needed" ) find_program(WaylandScanner NAMES wayland-scanner) @@ -86,8 +85,8 @@ endif() include_directories( . "src/" - "subprojects/wlroots/include/" - "subprojects/wlroots/build/include/" + "subprojects/wlroots-hyprland/include/" + "subprojects/wlroots-hyprland/build/include/" "subprojects/udis86/" "protocols/") set(CMAKE_CXX_STANDARD 23) @@ -108,7 +107,13 @@ else() endif() find_package(OpenGL REQUIRED COMPONENTS ${GLES_VERSION}) -pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1 hyprlang>=0.3.2 hyprcursor) # we do not check for wlroots, as we provide it ourselves +pkg_check_modules(deps REQUIRED IMPORTED_TARGET + xkbcommon + wayland-server wayland-client wayland-cursor wayland-protocols + cairo pango pangocairo pixman-1 + libdrm libinput hwdata libseat libdisplay-info libliftoff libudev gbm + hyprlang>=0.3.2 hyprcursor +) file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp") @@ -119,7 +124,7 @@ if(USE_TRACY) endif() add_executable(Hyprland ${SRCFILES} ${TRACY_CPP_FILES}) -add_dependencies(Hyprland wlroots) +add_dependencies(Hyprland wlroots-hyprland) if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) message(STATUS "Setting debug flags") @@ -172,8 +177,8 @@ if(NO_XWAYLAND) add_compile_definitions(NO_XWAYLAND) else() message(STATUS "XWAYLAND Enabled (NO_XWAYLAND not defined) checking deps...") - pkg_check_modules(xcbdep REQUIRED IMPORTED_TARGET xcb) - target_link_libraries(Hyprland PkgConfig::xcbdep) + pkg_check_modules(xdeps REQUIRED IMPORTED_TARGET xcb xwayland xcb-util xcb-render xcb-image xcb-xfixes xcb-errors xcb-icccm xcb-composite xcb-res xcb-ewmh) + target_link_libraries(Hyprland PkgConfig::xdeps) endif() if(NO_SYSTEMD) @@ -228,7 +233,7 @@ function(protocol protoPath protoName external) endfunction() target_link_libraries(Hyprland - ${CMAKE_SOURCE_DIR}/subprojects/wlroots/build/libwlroots.so.13032 # wlroots is provided by us + ${CMAKE_SOURCE_DIR}/subprojects/wlroots-hyprland/build/libwlroots.a OpenGL::EGL OpenGL::GL Threads::Threads diff --git a/subprojects/wlroots b/subprojects/wlroots deleted file mode 160000 index 50eae512..00000000 --- a/subprojects/wlroots +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b diff --git a/subprojects/wlroots-hyprland b/subprojects/wlroots-hyprland new file mode 160000 index 00000000..62eeffbe --- /dev/null +++ b/subprojects/wlroots-hyprland @@ -0,0 +1 @@ +Subproject commit 62eeffbe233d199f520a5755c344e85f8eab7940