Skip to content

Conversation

OPNA2608
Copy link

Based on & includes #222.

Working on closing downstream issue https://gitlab.com/ubports/development/apps/lomiri-camera-app/-/issues/209.

The QMake script has code for generating a pkg-config file, which the CMake one lacks.

# pkg-config support
CONFIG += create_pc create_prl no_install_prl
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
QMAKE_PKGCONFIG_LIBDIR = ${prefix}/lib
QMAKE_PKGCONFIG_INCDIR = ${prefix}/include

This adds code to the CMake script to also generate a pkg-config file, which allows the unconditional use of pkg-config to gather flags for an installed QZXing library.

An example:

↪ cat /nix/store/i6gd51yg61b0ipfcan10q30phpkzz4bc-qzxing-3.3.0/lib/pkgconfig/QZXing.pc 
prefix=/nix/store/i6gd51yg61b0ipfcan10q30phpkzz4bc-qzxing-3.3.0
exec_prefix=${prefix}
libdir=/nix/store/i6gd51yg61b0ipfcan10q30phpkzz4bc-qzxing-3.3.0/lib
includedir=/nix/store/i6gd51yg61b0ipfcan10q30phpkzz4bc-qzxing-3.3.0/include/qzxing

Name: Qzxing
Description: Qzxing Library
Version: 3.3.0
Cflags: -DQZXING_MULTIMEDIA -DQZXING_QML -DDISABLE_LIBRARY_FEATURES -I${includedir}
Libs: -L${libdir} -lqzxing

@OPNA2608 OPNA2608 force-pushed the add/cmake-pkgconfig branch from 1e19d1c to 32b1446 Compare July 23, 2024 13:28
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.

2 participants