Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. linking Qt6::BundledZLIB breaks with Emscripten and Conan (Qt6 + cpr/libcurl + Zlib)
Forum Updated to NodeBB v4.3 + New Features

linking Qt6::BundledZLIB breaks with Emscripten and Conan (Qt6 + cpr/libcurl + Zlib)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 42 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qwendt
    wrote last edited by
    #1

    I am working on a project where I want to build a Qt6 + WebAssembly (Emscripten) application and link it together with a custom library that uses cpr/libcurl (installed via Conan).

    my Setup

    • Host: Linux (gcc 13, CMake 3.31, Conan 2.4, CLion 2025.1)

    • Target: WebAssembly (Emscripten 3.1.56, wasm_singlethread)

    • Dependencies via Conan: cpr, libcurl, nlohmann_json, spdlog, zlib

    • GUI layer: Qt6.8.3 (prebuilt wasm_singlethread package from the Qt installer)

    The issue

    When configuring my project with CMake, Qt’s CMake files insist on looking for Qt6::BundledZLIB. Since my prebuilt Qt6/WASM installation doesn’t ship Qt6BundledZLIBConfig.cmake, I get:

    Can't find Qt6::BundledZLIB.
    

    Actually I don’t want to use Qt’s internal Zlib at all. Both cpr/libcurl and Qt’s network module should be able to use the system Zlib provided by Emscripten (-sUSE_ZLIB=1, or Conan’s ZLIB::ZLIB target).

    Linking it directly in my own executable/library causes conflicts: I’d end up with two Zlib implementations in the link (Qt’s bundled one and Emscripten’s system one).

    I also set the CMake options:

    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6BundledZLIB=ON
    -DQT_FEATURE_system_zlib=ON
    -DQT_NO_ZLIB=OFF
    

    Did not help at all.

    Is there a recommended way to configure a prebuilt Qt WASM package so that it doesn’t try to pull in Qt6::BundledZLIB, but uses the system Zlib instead?

    Thank you

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved