diff --git a/.github/workflows/ubuntu.yaml b/.github/workflows/ubuntu.yaml index 0f2a18c..b974f0e 100644 --- a/.github/workflows/ubuntu.yaml +++ b/.github/workflows/ubuntu.yaml @@ -31,7 +31,17 @@ jobs: - name: Install dependencies run: | sudo apt update - sudo apt install -y llvm-14 ninja-build libgconf2-dev libjavascriptcoregtk-4.0-dev + sudo apt install -y llvm-14 ninja-build + + major_version=$(lsb_release -rs | cut -d'.' -f1) + if [ "$major_version" -le "22" ]; then + sudo apt install -y libgconf2-dev + fi + if [ "$major_version" -ge "24" ]; then + sudo apt install -y libjavascriptcoregtk-4.1-dev + else + sudo apt install -y libjavascriptcoregtk-4.0-dev + fi - name: Checkout repository uses: actions/checkout@v4 diff --git a/CMakeLists.txt b/CMakeLists.txt index c6b80e2..f76c792 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -291,7 +291,7 @@ elseif(UNIX) # Don't link libraries at compile time since we dynamically load them at runtime target_include_directories(proxyres PRIVATE ${GConf_INCLUDE_DIRS}) - pkg_search_module(JSCoreGTK REQUIRED javascriptcoregtk-4.0 javascriptcoregtk-3.0 javascriptcoregtk-1.0) + pkg_search_module(JSCoreGTK REQUIRED javascriptcoregtk-4.1 javascriptcoregtk-4.0 javascriptcoregtk-3.0 javascriptcoregtk-1.0) # Don't link libraries at compile time since we dynamically load them at runtime target_include_directories(proxyres PRIVATE ${JSCoreGTK_INCLUDE_DIRS})