Open KOLANICH opened 3 years ago
Hi @KOLANICH , thanks a lot for your patch. I'm not familiar with CPack, but I'll check what this patch is doing. Besides, could you please let me know the purpose of this patch? I mean, what this patch is trying to do? Thanks.
@KOLANICH I just tested your patch as I’m looking to migrate a configure.ac package to allow the use of argtable3 instead of argtable2. The only issue I had was that the built .pc file has Version: 0.0.0.0
instead of 3.2.2
Follow-up. libdir
and Libs
were also missing. Once these were updated, my package was able to link against argtable3
prefix=/usr
includedir=${prefix}/include
libdir=${prefix}/lib
Name: argtable3
Description: ANSI C command-line parsing library
Version: 3.2.2
Libs: -L${libdir} -largtable3_static
Cflags: -I${includedir}
@heitbaum : Thanks for the feedback for @KOLANICH 's patch. Could you please teach me what this patch is doing? Do you mean that I need to follow your suggestion to change @KOLANICH 's patch? Thanks.
CPack is used (in part) to facilitate the creation of a pkg-config file. https://cmake.org/cmake/help/latest/module/CPack.html
the patch works, it just needs some adjustments, as the currently generated file needs to be “fixed” to match my output above, so that it can be used correctly in a ./configure
$ cat build/argtable3-3.2.2.f25c624/usr/lib/pkgconfig/argtable3.pc
prefix=/usr
includedir=${prefix}/include
Name: argtable3
Description: ANSI C command-line parsing library
Version: 0.0.0.0
Cflags: -I${includedir}
@tomghuang