From f2cd314de6a703311344de757a6f1a2230ce20bc Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Fri, 20 Dec 2024 13:43:10 -0800 Subject: [PATCH] Use libjavascriptcoregtk-4.1 by default. --- .github/workflows/ubuntu.yaml | 9 ++++++++- CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yaml b/.github/workflows/ubuntu.yaml index 0f2a18c..237f0b3 100644 --- a/.github/workflows/ubuntu.yaml +++ b/.github/workflows/ubuntu.yaml @@ -31,7 +31,14 @@ 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 ninja-build libgconf2-dev + + major_version=$(lsb_release -rs | cut -d'.' -f1) + if [ "$major_version" -ge "24" ]; then + sudo apt install -y llvm-15 libjavascriptcoregtk-4.1-dev + else + sudo apt install -y llvm-14 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})