Skip to content

cmake: Use system-installed libzip instead of building from source#55

Draft
jeromehaxhiaj-qti wants to merge 1 commit intoqualcomm:mainfrom
jeromehaxhiaj-qti:use-local-libzip
Draft

cmake: Use system-installed libzip instead of building from source#55
jeromehaxhiaj-qti wants to merge 1 commit intoqualcomm:mainfrom
jeromehaxhiaj-qti:use-local-libzip

Conversation

@jeromehaxhiaj-qti
Copy link
Copy Markdown
Contributor

Replace the CPM-fetched libzip with find_package via pkg-config,
requiring libzip to be pre-installed on the host. This speeds up
configuration and avoids building libzip from source in-tree.

Changes:

  • Use pkg_check_modules(LIBZIP) instead of CPM fetch, avoiding broken
    CMake config files shipped by Ubuntu's libzip-dev (which reference
    tool binaries from the missing libzip-tools package)
  • Add libzip to install_dependencies.sh for all supported platforms
    (Ubuntu, MSYS2, macOS)
  • Set BUILD_SHARED_LIBS=ON explicitly, since CPM-fetched libzip was
    previously setting this as a side effect via its option() call;
    without it, SystemC defaults to static on Windows, causing
    multiple-definition errors when plugin DLLs link against both
    libqbox.dll and libsystemc.a
  • Remove unused #include <zipint.h> (internal libzip header not
    available in the system package)

Signed-off-by: Jerome Haxhiaj jhaxhiaj@qti.qualcomm.com

Replace the CPM-fetched libzip with find_package via pkg-config,
requiring libzip to be pre-installed on the host. This speeds up
configuration and avoids building libzip from source in-tree.

Changes:
- Use pkg_check_modules(LIBZIP) instead of CPM fetch, avoiding broken
  CMake config files shipped by Ubuntu's libzip-dev (which reference
  tool binaries from the missing libzip-tools package)
- Add libzip to install_dependencies.sh for all supported platforms
  (Ubuntu, MSYS2, macOS)
- Set BUILD_SHARED_LIBS=ON explicitly, since CPM-fetched libzip was
  previously setting this as a side effect via its option() call;
  without it, SystemC defaults to static on Windows, causing
  multiple-definition errors when plugin DLLs link against both
  libqbox.dll and libsystemc.a
- Remove unused #include <zipint.h> (internal libzip header not
  available in the system package)

Signed-off-by: Jerome Haxhiaj <jhaxhiaj@qti.qualcomm.com>
@jeromehaxhiaj-qti jeromehaxhiaj-qti self-assigned this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant