hyperrealm / libconfig

C/C++ library for processing configuration files
https://hyperrealm.github.io/libconfig/
GNU Lesser General Public License v2.1
1.1k stars 359 forks source link

cmake: Fix broken static library build for c++ target #241

Open Challanger524 opened 2 months ago

Challanger524 commented 2 months ago

PR for issue: #237

If you try to build C++ target with option(BUILD_SHARED_LIBS "Enable shared library" OFF) - it will fail coz C code being built in shared-lib manner, due to missing LIBCONFIG_STATIC definition.

This is the fix.