projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.33k stars 372 forks source link

Generated .pc file for static build not usable #702

Closed JohannesKauffmann closed 9 months ago

JohannesKauffmann commented 1 year ago

Describe the bugs:

Finally, maybe a nitpick, but it looks like no .pc files are getting installed when no CMAKE_BUILD_TYPE is specified. Maybe it would be a good idea to default to either one of the four configurations (Debug, RelWithDebInfo, etc) when none is specified?

Desktop:

kblaschke commented 1 year ago

CMAKE_BUILD_TYPE is only used in single-configuration generators and may be empty. Setting it to something when it's not needed can cause strange behavior, which is detailed here:

https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#build-configurations

That said, a user should always specify the configuration to build, so not installing the files in such a situation isn't really an issue since the build simply doesn't know what type of output to produce (it rather depends on the toolset defaults).

If anything, adding a note to the build documentation should suffice IMO.

kblaschke commented 10 months ago

Also checked that -DPROJECTM_STATIC_DEFINE appears in all .pc files for Release and Debug configurations and all libs, which it does.