Generate pkg-config files
Hi,
I never developed with Panda3D but I needed to compile C++ code using Panda (Debian). This is a simple build shell script calling -L/usr/lib/panda3d -lpanda ... but it looks like Panda3D does not offer the installation of pkg-config files. I looked for one inside the .deb file I compiled, as well in /usr/lib/pkgconfig I found nothing!
So, it may be interesting to create one. In addition, this is very simple to make and for the developer more easier :) Just an idea:
file /usr/lib/pkgconfig/panda.pc
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib/panda3d
includedir=/usr/include/panda3d
Name: Panda3D
Description: an open-source, completely free-to-use engine for realtime 3D games
Version: 1.10.1
Libs: -L${libdir} -lp3framework -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -lp3direct -lpthread
Cflags: -I${includedir} -I/usr/include/python2.7
Examples:
-
pkg-config panda --libswill return-L/usr/lib/panda3d -lp3framework -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -lp3direct -lpthread - and
pkg-config panda --cflagswill return-I/usr/include/panda3d -I/usr/include/python2.7
PS: for example, the script is using -lp3pystub which is no longer exists in my version and it's lib path was -L/usr/lib/panda3d while mine is -L/usr/lib/x86_64-linux-gnu/panda3d. pkg-config allows fixing this kind of problems.
CC'ing @CFSworks, who is working on the CMake port which aims to provide CMake integration so that the Panda3D libraries can be easily linked in by CMake users.
I like the idea of providing pkg-config files for non-CMake users.