From 616acdd929f760dcef29956dbcdd87c6c322f05a Mon Sep 17 00:00:00 2001 From: jhayar Date: Tue, 17 Sep 2024 20:30:00 +0800 Subject: [PATCH] added libhybris , setting SDL_VIDEODRIVER as null and setting QT_QPA_PLATFORm to ubuntumirclient --- CMakeLists.txt | 5 ++++- clickable.yaml | 3 +++ src/main.cpp | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3678b1f171e..46e2f9a2a01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -278,9 +278,12 @@ if(NOT EMSCRIPTEN) IF(MIR_BUILD) find_package(Qt5Gui REQUIRED) #LOMIRI doesnt start without starting QGui find_package(Qt5Core REQUIRED) + pkg_search_module(Hybris REQUIRED hybris-egl-platform > 0.1.0) + target_compile_definitions(supertux2_lib PUBLIC MIR_BUILD=1) - target_link_directories(supertux2_lib PUBLIC ${SDL2_LIBDIR}) + target_link_directories(supertux2_lib PUBLIC ${SDL2_LIBDIR} ${Hybris_LIBDIR}) target_link_libraries(supertux2_lib PUBLIC Qt5::Gui Qt5::Core) + target_link_libraries(supertux2_lib PUBLIC ${Hybris_LIBRARIES}) endif() target_link_libraries(supertux2_lib PUBLIC LibSDL2_ttf) target_link_libraries(supertux2_lib PUBLIC LibSDL2 LibSDL2_image) diff --git a/clickable.yaml b/clickable.yaml index 0167ff93855..8ef2ffccdb2 100644 --- a/clickable.yaml +++ b/clickable.yaml @@ -20,6 +20,7 @@ dependencies_target: - "libpng-dev" - "libvorbis-dev" - "libraqm-dev" + - "libhybris-dev" install_lib: - "/usr/lib/${ARCH_TRIPLET}/libogg.so*" @@ -38,6 +39,8 @@ install_lib: - "/usr/lib/${ARCH_TRIPLET}/libsndio.so*" - "/lib/${ARCH_TRIPLET}/libz.so.1.2.11" - "/lib/${ARCH_TRIPLET}/libraqm.so*" + - "/lib/${ARCH_TRIPLET}/libEGL_libhybris.so.0" + - "/lib/${ARCH_TRIPLET}/libEGL_libhybris.so.0.*" build_args: - "-DUBUNTU_TOUCH=ON" - "-DENABLE_OPENGL=OFF" diff --git a/src/main.cpp b/src/main.cpp index 50c8e27fd31..d7870e8d869 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,6 +30,8 @@ static std::unique_ptr
g_main; int main(int argc, char** argv) { #ifdef MIR_BUILD + qputenv("SDL_VIDEODRIVER",""); + qputenv("QT_QPA_PLATFORM","ubuntumirclient"); QGuiApplication app(argc, argv); #endif g_main = std::make_unique
();